-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEQ] Added semantic releases automation #36
Merged
niloofar-deriv
merged 12 commits into
deriv-com:master
from
adrienne-deriv:semantic-release-automation
Apr 8, 2024
Merged
Changes from 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
aaf6116
chore: added release automation
adrienne-deriv caaef8f
chore: updated package-lock.json
adrienne-deriv 171537e
chore: updated action branch event
adrienne-deriv 75b6fe7
chore: updated workflow branch trigger
adrienne-deriv ecc8f67
Merge branch 'semantic-release-automation' of github.com:adrienne-der…
adrienne-deriv 6ad9ac1
chore: ignore config files for vitest
adrienne-deriv 68660dc
chore: ignore config files for vitest
adrienne-deriv 40bc493
chore: added more rules to ignore config files
adrienne-deriv 27c3c8b
chore: added utils config to ignore coverage
adrienne-deriv 719a3ba
chore: added exclude option for coverage
adrienne-deriv 3e135e6
chore: fix issues with coverage
adrienne-deriv d12dd02
chore: remove redundant permissions in workflow
adrienne-deriv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,48 @@ | ||
name: Build and Publish to NPM | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- next | ||
- next-major | ||
- alpha | ||
- beta | ||
- development | ||
|
||
permissions: | ||
contents: read # for checkout | ||
|
||
jobs: | ||
build_and_publish_npm: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
environment: Production | ||
niloofar-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 | ||
with: | ||
node-version: '20' | ||
- name: Update to latest npm (temporary fix for audit below) | ||
run: npm install --global npm | ||
- name: Install dependencies | ||
run: npm clean-install | ||
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | ||
niloofar-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: npm audit signatures | ||
- name: Prepublish | ||
run: npm run prepublish | ||
- name: Release | ||
if: success() | ||
env: | ||
CI: true | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that |
||
run: npx semantic-release |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adrienne-deriv, can this be at the job level or is it needed globally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The job already has
contents: write
permission, so this is redundant, I'll remove it