-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from semantic-release/actions
- Loading branch information
Showing
11 changed files
with
16,107 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Release | ||
"on": | ||
push: | ||
branches: | ||
- master | ||
- next | ||
- beta | ||
- "*.x" | ||
permissions: | ||
contents: read # for checkout | ||
jobs: | ||
release: | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
name: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
cache: npm | ||
node-version: lts/* | ||
- run: npm clean-install | ||
- run: npm audit signatures | ||
# pinned version updated automatically by Renovate. | ||
# details at https://semantic-release.gitbook.io/semantic-release/usage/installation#global-installation | ||
- run: npx [email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
# renovate/** branches are generated by https://github.com/apps/renovate | ||
- renovate/** | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
NPM_CONFIG_COLOR: always | ||
|
||
jobs: | ||
# verify against ranges defined as supported in engines.node | ||
test_matrix: | ||
strategy: | ||
matrix: | ||
node-version: | ||
- 18.17 | ||
- 20.6.1 | ||
- 20 | ||
- 21 | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
- run: npm clean-install | ||
# - run: npm audit signatures | ||
- run: npm test | ||
|
||
# verify against the node version defined for development in the .nvmrc | ||
test_dev: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Use Node.js from .nvmrc | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: npm | ||
- run: npm clean-install | ||
- run: npm audit signatures | ||
- run: npm test | ||
|
||
# separate job to set as required in branch protection, | ||
# as the build names above change each time Node versions change | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test_dev | ||
- test_matrix | ||
if: ${{ !cancelled() }} | ||
steps: | ||
- name: All matrix versions passed | ||
if: ${{ !(contains(needs.*.result, 'failure')) }} | ||
run: exit 0 | ||
- name: Some matrix version failed | ||
if: ${{ contains(needs.*.result, 'failure') }} | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.