Skip to content

Commit 287fe98

Browse files
committed
Move release creation to after tests on main
1 parent 45f20f2 commit 287fe98

File tree

2 files changed

+34
-39
lines changed

2 files changed

+34
-39
lines changed

.github/workflows/deploy.yml

-38
This file was deleted.

.github/workflows/on-main.yml

+34-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
branches:
44
- main
55

6-
name: Main Build
6+
name: Check Main and Create GitHub Release
77

88
jobs:
99
check:
@@ -28,3 +28,36 @@ jobs:
2828
- name: cargo clippy
2929
run: cargo clippy -- -D warnings
3030

31+
cut-release:
32+
needs:
33+
- check
34+
if: ${{ github.actor != 'ethankhall-release-bot[bot]' }}
35+
runs-on: ubuntu-latest
36+
name: Cut and Release New Version
37+
steps:
38+
- uses: actions/create-github-app-token@v1
39+
id: app-token
40+
with:
41+
app-id: ${{ vars.APP_ID }}
42+
private-key: ${{ secrets.PRIVATE_KEY }}
43+
44+
- name: Checkout repository
45+
uses: actions/checkout@v4
46+
with:
47+
token: ${{ steps.app-token.outputs.token }}
48+
fetch-depth: 0
49+
50+
- uses: swatinem/rust-cache@v2
51+
52+
- name: Install cargo-release
53+
run: cargo install cargo-release
54+
55+
- name: Setup user details
56+
run: |
57+
git config --global user.email "ethankhall-release-bot[bot]@users.noreply.github.com"
58+
git config --global user.name "ethankhall-release-bot[bot]"
59+
60+
- name: Release latest version
61+
run: cargo release --execute --no-confirm --no-verify patch
62+
env:
63+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)