-
Notifications
You must be signed in to change notification settings - Fork 47
38 lines (35 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:
pull_request:
branches: [main]
types: [labeled,closed]
jobs:
tag:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
steps:
- uses: actions/checkout@v3
- uses: christophebedard/tag-version-commit@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
version_regex: 'v([0-9]+\.[0-9]+\.[0-9]+)'
version_tag_prefix: 'v'
release-artifact:
needs: tag
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
steps:
- uses: actions/checkout@v3
- name: Quick Setup
uses: ./.github/workflows/quick-setup
- name: Build artifact
run: cargo build --release -p mdbook-aquascope -p aquascope_front
- name: Package artifact
run: tar -czf aquascope-x86_64-unknown-linux-gnu.tar.gz mdbook-aquascope cargo-aquascope aquascope-driver
working-directory: target/release
- name: Release artifact
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.pull_request.title }}
files: |
target/release/aquascope-x86_64-unknown-linux-gnu.tar.gz