Skip to content

Commit ee61f63

Browse files
committed
move release to separate workflow
1 parent 2f81467 commit ee61f63

File tree

2 files changed

+47
-28
lines changed

2 files changed

+47
-28
lines changed

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Build
19+
run: cargo build --verbose
20+
- name: Run tests
21+
run: cargo test --all --verbose
22+
23+
release:
24+
runs-on: ubuntu-latest
25+
if: "startsWith(github.ref, 'refs/tags/')"
26+
needs: build
27+
environment: release
28+
permissions:
29+
id-token: write
30+
steps:
31+
- uses: actions/checkout@v3
32+
- name: install cargo-release
33+
uses: taiki-e/install-action@v2
34+
with:
35+
tool: cargo-release
36+
- name: cargo login
37+
run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
38+
- name: "cargo release publish"
39+
run: |-
40+
cargo release \
41+
publish \
42+
--workspace \
43+
--all-features \
44+
--allow-branch HEAD \
45+
--no-confirm \
46+
--no-verify \
47+
--execute

.github/workflows/rust.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Rust
33
on:
44
push:
55
branches: [ "master" ]
6-
tags:
7-
- '*'
86
pull_request:
97
branches: [ "master" ]
108

@@ -22,29 +20,3 @@ jobs:
2220
run: cargo build --verbose
2321
- name: Run tests
2422
run: cargo test --all --verbose
25-
26-
release:
27-
runs-on: ubuntu-latest
28-
if: "startsWith(github.ref, 'refs/tags/')"
29-
needs: build
30-
environment: release
31-
permissions:
32-
id-token: write
33-
steps:
34-
- uses: actions/checkout@v3
35-
- name: install cargo-release
36-
uses: taiki-e/install-action@v2
37-
with:
38-
tool: cargo-release
39-
- name: cargo login
40-
run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
41-
- name: "cargo release publish"
42-
run: |-
43-
cargo release \
44-
publish \
45-
--workspace \
46-
--all-features \
47-
--allow-branch HEAD \
48-
--no-confirm \
49-
--no-verify \
50-
--execute

0 commit comments

Comments
 (0)