Skip to content

Commit

Permalink
Add release related automation
Browse files Browse the repository at this point in the history
  • Loading branch information
gtker committed Feb 12, 2024
1 parent 7b019d5 commit c8922dc
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- v[0-9]+.*

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
# (Optional) Path to changelog.
changelog: CHANGELOG.md
# (Required) GitHub token for creating GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ pre-release-replacements = [
{file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1},
{file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/gtker/wow_srp/compare/{{tag_name}}...HEAD", exactly=1},
]
pre-release-hook = ["./tests/pre-release.sh"]
allow-branch = ["main"]
11 changes: 11 additions & 0 deletions tests/pre-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e

export RUSTFLAGS="-D warnings"
export CARGO_INCREMENTAL=0

cargo install cargo-hack --locked

cargo hack test --feature-powerset
cargo hack clippy --feature-powerset

0 comments on commit c8922dc

Please sign in to comment.