-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (36 loc) · 1.26 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: release
on:
push:
branches:
- main
env:
RELEASE_PLZ_BIN_URL: https://github.com/MarcoIeni/release-plz/releases/download/release-plz-v0.3.11/release-plz-x86_64-unknown-linux-gnu.tar.gz
jobs:
publish:
name: publish
runs-on: ubuntu-latest
if: "startsWith(github.event.head_commit.message, 'chore(release):')"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
token: ${{ secrets.RELEASE_PAT }}
- name: configure git for release
shell: bash
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
# It's possible to `cargo install` these tools, but it's very slow to compile on GHA infra.
# Therefore we just pull some binaries from the Github Releases.
- name: install tools
shell: bash
run: |
curl -L -O $RELEASE_PLZ_BIN_URL
tar xvf release-plz-x86_64-unknown-linux-gnu.tar.gz
rm release-plz-x86_64-unknown-linux-gnu.tar.gz
sudo mv release-plz /usr/local/bin
- name: publish and release
shell: bash
run: |
cargo login ${{ secrets.CRATES_IO_TOKEN }}
release-plz release --git-token ${{ secrets.RELEASE_PAT }}