-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (49 loc) · 1.55 KB
/
release.yml
File metadata and controls
59 lines (49 loc) · 1.55 KB
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: release
on:
push:
tags:
- v[0-9].[0-9]+.[0-9]+
- v[0-9].[0-9]+.[0-9]+-rc[0-9]+
workflow_dispatch:
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: poet-bin-linux-amd64
- os: macos-latest
artifact_name: poet-bin-macos-arm
steps:
- name: checkout code
uses: actions/checkout@v4
- name: set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: build the binary
run: make release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: release-version
uses: intentee/release-action/release-tag-to-version@abdb835f34e49f5107b4569a381e0853c399797f
with:
release-tag: "${{ github.ref_name }}"
- name: rename the binary
run: mv ./target/release/poet ./${{ matrix.artifact_name }}
shell: bash
- uses: intentee/release-action/assert-version@abdb835f34e49f5107b4569a381e0853c399797f
with:
filename: "./${{ matrix.artifact_name }}"
expected-version: "${{ steps.release-version.outputs.version }}"
- name: upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: ./${{ matrix.artifact_name }}*
file_glob: true
overwrite: true
prerelease: ${{ steps.release-version.outputs.type == 'PRE_RELEASE' }}
tag: ${{ github.ref }}