Skip to content

Commit 1dbf692

Browse files
committed
fix pipelines
1 parent 0e1da85 commit 1dbf692

File tree

2 files changed

+13
-38
lines changed

2 files changed

+13
-38
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,18 @@ jobs:
1818
runs-on: ubuntu-24.04
1919
timeout-minutes: 5
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v5
2222
with:
2323
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
24-
- run: |
25-
git config --global user.name 'AboutBits Tech'
26-
git config --global user.email 'tech@aboutbits.it'
27-
- uses: aboutbits/github-actions-node/setup-and-install@v2
24+
- uses: aboutbits/github-actions-base/git-setup@v2
25+
- uses: aboutbits/github-actions-node/build-and-publish-package@v3
26+
id: package
2827
with:
2928
node-version: ${{ env.NODE_VERSION }}
3029
registry-url: 'https://registry.npmjs.org'
31-
- name: Get current package version
32-
id: currentVersion
33-
run: echo "currentVersion=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
34-
- name: Validate prerelease increment
35-
if: github.event.inputs.increment == 'prerelease' && !contains(steps.currentVersion.outputs.currentVersion, '-')
36-
run: exit 1
37-
- name: npm version
38-
run: |
39-
if [ -n "${{ github.event.inputs.preid }}" ]; then
40-
npm version ${{ github.event.inputs.increment }} --preid ${{ github.event.inputs.preid }}
41-
else
42-
npm version ${{ github.event.inputs.increment }}
43-
fi
44-
- name: Get next package version
45-
id: nextVersion
46-
run: echo "nextVersion=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
47-
- run: npm publish
48-
env:
49-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
50-
- name: Create GitHub release
51-
uses: actions/github-script@v7
30+
registry-token: ${{ secrets.NPM_TOKEN }}
31+
increment: ${{ github.event.inputs.increment }}
32+
preid: ${{ github.event.inputs.preid }}
33+
- uses: aboutbits/github-actions-base/github-create-release@v2
5234
with:
53-
script: |
54-
github.rest.repos.createRelease({
55-
owner: context.repo.owner,
56-
repo: context.repo.repo,
57-
tag_name: 'v${{ steps.nextVersion.outputs.nextVersion }}',
58-
name: 'v${{ steps.nextVersion.outputs.nextVersion }}',
59-
prerelease: '${{ steps.nextVersion.outputs.nextVersion }}'.includes('-')
60-
})
35+
tag-name: '${{ steps.package.outputs.version }}'

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
matrix:
1515
node_version: [18, 20, 22]
1616
steps:
17-
- uses: actions/checkout@v4
18-
- uses: aboutbits/github-actions-node/setup-and-install@v2
17+
- uses: actions/checkout@v5
18+
- uses: aboutbits/github-actions-node/setup-and-install@v3
1919
with:
2020
node-version: ${{ matrix.node_version }}
2121
- name: Lint
@@ -32,8 +32,8 @@ jobs:
3232
matrix:
3333
node_version: [18, 20, 22]
3434
steps:
35-
- uses: actions/checkout@v4
36-
- uses: aboutbits/github-actions-node/setup-and-install@v2
35+
- uses: actions/checkout@v5
36+
- uses: aboutbits/github-actions-node/setup-and-install@v3
3737
with:
3838
node-version: ${{ matrix.node_version }}
3939
- name: Test

0 commit comments

Comments
 (0)