This repository has been archived by the owner on Sep 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(fix): add semantic release workflow and some version bumps
- Loading branch information
Showing
7 changed files
with
1,235 additions
and
1,372 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
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,51 @@ | ||
name: Semantic-Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
NODE_VERSION: ${{ '18' }} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
release: | ||
name: Set release tag | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
outputs: | ||
initial-version: ${{ steps.save-initial-version.outputs.version }} | ||
version: ${{ steps.save-version.outputs.version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Save initial Version | ||
id: save-initial-version | ||
run: echo "version=$(cat package.json | jq '.version' | xargs)" >> $GITHUB_OUTPUT | ||
|
||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Install Dependencies | ||
run: | | ||
npm i -g @semantic-release/changelog@^6.0.3 @semantic-release/exec@^6.0.3 @semantic-release/git@^10.0.1 semantic-release@^20.1.0 | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
GH_TOKEN: ${{ github.token }} | ||
GITHUB_URL: ${{ github.server_url }} | ||
HUSKY: 0 | ||
run: semantic-release | ||
|
||
- name: Save Version | ||
id: save-version | ||
run: echo "version=$(cat package.json | jq '.version' | xargs)" >> $GITHUB_OUTPUT |
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,61 @@ | ||
{ | ||
"branches": ["main"], | ||
"tagFormat": "v${version}", | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "angular", | ||
"releaseRules": [ | ||
{ "type": "test", "scope": "fix", "release": "patch" }, | ||
{ "type": "ci", "scope": "fix", "release": "patch" } | ||
] | ||
} | ||
], | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "angular" | ||
} | ||
], | ||
"@semantic-release/changelog", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"npmPublish": false | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "cat cumulocity.json | jq --arg version \"${nextRelease.version}\" '.version = $version' > .tmp && mv .tmp cumulocity.json" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"CHANGELOG.md", | ||
"**/package.json", | ||
"**/package-lock.json", | ||
"**/cumulocity.json" | ||
], | ||
"message": "ci(release): ${nextRelease.version}\n\n${nextRelease.notes}" | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "npm run build:release" | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"assets": ["acme.zip"], | ||
"draftRelease": true | ||
} | ||
] | ||
], | ||
"preset": "angular" | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:gallium-alpine | ||
FROM node:18-alpine | ||
|
||
WORKDIR /usr/app | ||
|
||
|
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.