Skip to content

Commit 2009753

Browse files
committed
ci(refactor): cleaner steps
1 parent 7a001e3 commit 2009753

File tree

1 file changed

+33
-25
lines changed

1 file changed

+33
-25
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,54 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
jobs:
13-
build:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v4
17-
- uses: actions/setup-node@v3
18-
with:
19-
node-version: 20
20-
cache: 'npm'
21-
- run: npm i
22-
# - name: lint
23-
# run: npm run lint
24-
# - run: npm run build
25-
# - name: Run test
26-
# run: npm run test:ci
27-
# - name: Upload coverage reports to Codecov
28-
# uses: codecov/[email protected]
29-
# with:
30-
# token: ${{ secrets.CODECOV_TOKEN }}
31-
# slug: rbalet/ngx-back-button
13+
# build:
14+
# runs-on: ubuntu-latest
15+
# steps:
16+
# - uses: actions/checkout@v4
17+
# - uses: actions/setup-node@v3
18+
# with:
19+
# node-version: 20
20+
# cache: 'npm'
21+
# - run: npm i
22+
# - name: lint
23+
# run: npm run lint
24+
# - run: npm run build
25+
# - name: Run test
26+
# run: npm run test:ci
27+
# - name: Upload coverage reports to Codecov
28+
# uses: codecov/[email protected]
29+
# with:
30+
# token: ${{ secrets.CODECOV_TOKEN }}
31+
# slug: rbalet/ngx-back-button
3232

3333
publish:
34-
needs: build
34+
# needs: build
3535
runs-on: ubuntu-latest
3636
if: github.ref_name == 'main'
3737
permissions:
3838
contents: write # to be able to publish a GitHub release
3939
issues: write # to be able to comment on released issues
4040
pull-requests: write # to be able to comment on released pull requests
4141
id-token: write # to enable use of OIDC for npm provenance
42+
4243
steps:
43-
- uses: actions/checkout@v4
44+
- name: ⬇️ Get latest code
45+
uses: actions/checkout@v4
4446
with:
4547
fetch-depth: 0
46-
- uses: actions/setup-node@v3
48+
49+
- name: ⬇️ Get Node.js
50+
uses: actions/setup-node@v4
4751
with:
4852
node-version: 20
4953
cache: 'npm'
50-
- run: npm i
51-
- run: npm run build
52-
- name: release
54+
55+
- name: 📦 Install dependencies
56+
run: npm i
57+
- name: 🏗️ Build
58+
run: npm run build && npm run copy-files
59+
60+
- name: 🚀 release
5361
run: cd dist/ngx-back-button && npx semantic-release --branches main
5462
env:
5563
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)