-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: release and publish tokens via gh actions
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 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,30 @@ | ||
name: Release and publish tokens | ||
on: | ||
push: | ||
branches: [main, beta] | ||
jobs: | ||
release: | ||
name: Create package for release | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Check out repository | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
# Setup node.js for workflow | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
# Installs dependencies | ||
- name: Install dependencies | ||
run: npm ci | ||
# Installs semantic release for fully automated version management and package publishing | ||
- name: Install semantic-release extra plugins | ||
run: npm install --save-dev @semantic-release/changelog @semantic-release/git | ||
# Runs semantic release | ||
- name: Release and publish package | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx semantic-release |
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,28 @@ | ||
module.exports = { | ||
branches: [ | ||
'main', | ||
{ | ||
name: 'beta', | ||
prerelease: true | ||
} | ||
], | ||
plugins: [ | ||
'@semantic-release/commit-analyzer', | ||
'@semantic-release/release-notes-generator', | ||
[ | ||
'@semantic-release/changelog', | ||
{ | ||
changelogFile: 'CHANGELOG.md' | ||
} | ||
], | ||
'@semantic-release/npm', | ||
'@semantic-release/github', | ||
[ | ||
'@semantic-release/git', | ||
{ | ||
assets: ['CHANGELOG.md', 'scss/**', 'assets/**'], | ||
message: 'chore(release): set `package.json` to ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}' | ||
} | ||
] | ||
] | ||
} |