Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 6 additions & 7 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,18 @@ jobs:
ref: ${{ github.event.pull_request.base.sha }}
fetch-depth: 0

- name: Set up ctrl-z
uses: squidfunk/ctrl-z@v0
- name: Set up mono
uses: zensical/mono@v0

- name: Get commit messages
run: |
base="${{ github.event.pull_request.base.sha }}"
head="${{ github.event.pull_request.head.sha }}"
git log "${base}..${head}" --pretty=format:"%s%n" > commits.txt
git log "${base}..${head}" --format=%h > commits.txt

- name: Validate commit messages
run: |
while IFS= read -r commit; do
[ -z "$commit" ] && continue
ctrl-z validate commit "$commit"
while IFS= read -r id; do
[ -z "$id" ] && continue
mono validate commit --id $id
done < commits.txt

15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
git tag -f $MAJOR_VERSION $VERSION
git push -f origin $MAJOR_VERSION


release:
name: Create release
runs-on: ubuntu-latest
Expand All @@ -95,8 +94,8 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: Set up ctrl-z
uses: squidfunk/ctrl-z@v0
- name: Set up mono
uses: zensical/mono@v0

- name: Download artifacts
uses: actions/download-artifact@v4
Expand All @@ -108,7 +107,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
ctrl-z version changelog -s $VERSION > notes.txt
mono version changelog -s $VERSION > notes.txt
gh release create $VERSION \
--title ${VERSION#v} \
--notes-file notes.txt \
Expand Down Expand Up @@ -140,13 +139,13 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: Set up ctrl-z
uses: squidfunk/ctrl-z@v0
- name: Set up mono
uses: zensical/mono@v0

- name: Publish to crates.io
run: |
ctrl-z version changed $VERSION | while read -r package; do
cargo publish --package $package --no-verify --locked --dry-run
mono version changed $VERSION | while read -r package; do
cargo publish --package $package --no-verify --locked
done
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}