-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since we want to use 0.x.y versions for now, we modify the behavior via releaseRules, e.g. * breaking is set to minor release (by default it's major) * feat is set to patch (by default it's minor) Once we release v1.0.0 we should reset these to their intended behavior.
- Loading branch information
Showing
4 changed files
with
98 additions
and
4 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,37 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read # for checkout | ||
jobs: | ||
lint-and-test: | ||
uses: ./.github/workflows/lint-and-test.yml | ||
|
||
release: | ||
name: Release | ||
runs-on: large-8-core-32gb-22-04 | ||
needs: [lint-and-test] | ||
environment: deploy #!! DO NOT CHANGE THIS LINE !! # | ||
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: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 # download tags, see https://github.com/actions/checkout/issues/100 | ||
- run: git config --global --add safe.directory $(realpath .) | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20.x" | ||
- name: Semantic Release | ||
run: | | ||
npm install semantic-release | ||
npx semantic-release | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
#CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} #TODO: add CRATES_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,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
VERSION=${1?expected version as argument} | ||
echo "Would build version $VERSION, but publishing is manual for now" |
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,56 @@ | ||
{ | ||
"name": "proof_of_sql", | ||
"version": "0.0.0-development", | ||
"devDependencies": { | ||
"conventional-changelog-conventionalcommits": "^5.0.0", | ||
"semantic-release": "^21.0.5" | ||
}, | ||
"release": { | ||
"branches": [ | ||
"main" | ||
], | ||
"tagFormat": "v${version}", | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "conventionalCommits", | ||
"releaseRules": [ | ||
{ "breaking": true, "release": "minor" }, | ||
{ "revert": true, "release": "patch" }, | ||
{ "type": "feat", "release": "patch" }, | ||
{ "type": "fix", "release": "patch" }, | ||
{ "type": "build", "release": "patch" }, | ||
{ "type": "docs", "release": "patch" }, | ||
{ "type": "chore", "release": "patch" }, | ||
{ "type": "bench", "release": "patch" }, | ||
{ "type": "perf", "release": "patch" }, | ||
{ "type": "refactor", "release": "patch" }, | ||
{ "type": "test", "release": "patch" }, | ||
{ "type": "ci", "release": "patch" } | ||
], | ||
"parserOpts": { | ||
"noteKeywords": [ | ||
"BREAKING CHANGE", | ||
"BREAKING CHANGES", | ||
"BREAKING" | ||
] | ||
} | ||
} | ||
], | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "bash ./ci/build.sh ${nextRelease.version}" | ||
} | ||
], | ||
[ | ||
"@semantic-release/github" | ||
] | ||
] | ||
}, | ||
"dependencies": { | ||
"@semantic-release/exec": "^6.0.3" | ||
} | ||
} |