-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.16 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Release
on:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Tag
id: tag
uses: hennejg/github-tag-action@v4.3.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: main
- name: Version
run: |
sed -i "s/^version.*/version = \"${{ steps.tag.outputs.new_version }}\"/" Cargo.toml
- name: Build
run: cargo build --release --verbose
- name: Test
working-directory: ./tests
run: |
./run --release
- name: Archive
run: |
mkdir lbdt-${{ github.ref_name}}
mv LICENSE README.md target/release/lbdt lbdt-${{ github.ref_name }}
tar -czf lbdt-${{ github.ref_name }}.tgz lbdt-${{ github.ref_name }}
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.tag.outputs.new_tag }}
tag_name: ${{ steps.tag.outputs.new_tag }}
generate_release_notes: true
files: lbdt-${{ github.ref_name }}.tgz