forked from maidsafe/autonomi
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 2.01 KB
/
version_bump.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Version Bump
# prevent concurrent version bumps
concurrency:
group: "version-bumping"
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
WORKFLOW_URL: https://github.com/maidsafe/safe_network/actions/runs
jobs:
bump_version:
if: |
github.repository_owner == 'maidsafe' &&
!startsWith(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "0"
token: ${{ secrets.VERSION_BUMP_COMMIT_PAT }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- shell: bash
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
# It's possible to `cargo install` release-plz, but it's very slow to compile on GHA infra.
# Therefore we just pull the binary from the Github Release.
- name: install release-plz
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
- shell: bash
run: ./resources/scripts/bump_version.sh
- name: push version bump commit
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.VERSION_BUMP_COMMIT_PAT }}
branch: main
tags: true
- name: post notification to slack on failure
if: ${{ failure() }}
uses: bryannice/[email protected]
env:
SLACK_INCOMING_WEBHOOK: ${{ secrets.SLACK_GH_ACTIONS_WEBHOOK_URL }}
SLACK_MESSAGE: "Please check the logs for the run at ${{ env.WORKFLOW_URL }}/${{ github.run_id }}"
SLACK_TITLE: "Version Bumping Failed"