-
-
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.
- Loading branch information
Showing
3 changed files
with
77 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,26 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- rc | ||
|
||
jobs: | ||
release: | ||
name: Semantic Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Install Semantic Release Dependencies | ||
run: npm install | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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,39 @@ | ||
{ | ||
"name": "simquil-semantic-release", | ||
"version": "1.0.0", | ||
"description": "Encapsulate dependencies needed to use semantic-release", | ||
"dependencies": { | ||
"@semantic-release/exec": "^5.0.0", | ||
"@semantic-release/git": "^9.0.0", | ||
"@semantic-release/gitlab": "^6.0.4", | ||
"conventional-changelog-eslint": "^3.0.8", | ||
"semantic-release": "^17.1.1" | ||
}, | ||
"release": { | ||
"branches": ["main", {"name": "rc", "prerelease": true}], | ||
"plugins": [ | ||
["@semantic-release/commit-analyzer",{ | ||
"preset": "eslint", | ||
"releaseRules": [ | ||
{"tag": "Breaking", "release": "minor"}, | ||
{"tag": "Update", "release": "patch"}, | ||
{"tag": "Fix", "release": "patch"}, | ||
{"tag": "New", "release": "patch"}, | ||
{"tag": "Upgrade", "release": "patch"} | ||
] | ||
}], | ||
["@semantic-release/release-notes-generator", { | ||
"preset": "eslint" | ||
}], | ||
["@semantic-release/exec",{ | ||
"prepareCmd": "sh prepare_release.sh ${nextRelease.version}" | ||
}], | ||
"@semantic-release/github", | ||
["@semantic-release/git", { | ||
"assets": ["Cargo.toml"], | ||
"message": "Release v${nextRelease.version} [skip ci]" | ||
}] | ||
], | ||
"repositoryUrl": "ssh://[email protected]/notmgsk/simquil.git" | ||
} | ||
} |
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,12 @@ | ||
#!/bin/sh | ||
|
||
### This script is called by Semantic Release after determining a new version | ||
### for the package and prior to pushing it back to GitHub | ||
|
||
set -ex | ||
|
||
[[ $1 == "" ]] && echo "usage: $0 <new version string>" && exit 1 | ||
|
||
# We use sed to bump the version to avoid having to install or use any other tools | ||
sed -i.bak -E "s/^version = \".+\"$/version = \"$1\"/" Cargo.toml | ||
rm Cargo.toml.bak |