Skip to content
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

ci: update releasing method #18

Merged
merged 1 commit into from
Dec 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -24,13 +24,9 @@ jobs:
release: true
git-user: github-actions
git-user-email: github-actions@github.com
- name: Release new version
run: './.github/workflows/release.sh ${{ steps.release.outputs.version }}'
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "chore: update version and docs for ${{ steps.release.outputs.version }} version"
add: '["README.md", "src/version.ts"]'
- name: Generate changelog and update doc & lib version
run: cog changelog --at ${{ steps.release.outputs.version }}\
-t full_hash > GITHUB_CHANGELOG.md

- name: Upload github release
uses: softprops/action-gh-release@v1
2 changes: 0 additions & 2 deletions .github/workflows/release.sh
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@

TAGVERSION=$1

cog changelog --at "$TAGVERSION" -t full_hash > GITHUB_CHANGELOG.md

# Version
sed -i "s/\".*\"/\"$TAGVERSION\"/" src/version.ts

3 changes: 2 additions & 1 deletion cog.toml
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@
ignore_merge_commits = true
branch_whitelist = ["main"]
pre_bump_hooks = [
"echo {{version}}",
"echo Releasing the {{version}} version",
"./.github/workflows/release.sh {{version}}",
]
post_bump_hooks = [
"git push",