Skip to content

Commit 2c7b573

Browse files
authored
Ci release (#12)
* release creating on tag pushs * fixed LICENSE file name
1 parent 7010d8c commit 2c7b573

File tree

2 files changed

+44
-22
lines changed

2 files changed

+44
-22
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,59 @@
11
on:
2-
release:
3-
types: [created]
2+
push:
3+
tags:
4+
- "v*.*.*"
45

56
name: Release artifacts
67

78
jobs:
89
release:
9-
name: release ${{ matrix.target }}
10+
name: Compile and release
1011
runs-on: ubuntu-latest
11-
strategy:
12-
fail-fast: false
13-
matrix:
14-
include:
15-
- target: x86_64-pc-windows-gnu
16-
archive: zip
17-
- target: x86_64-unknown-linux-musl
18-
archive: tar.gz tar.xz tar.zst
19-
- target: x86_64-apple-darwin
20-
archive: zip
2112
steps:
2213
- uses: actions/checkout@master
23-
- name: Compile and release
14+
- name: Compile target x86_64-unknown-linux-musl
15+
id: linux_musl
16+
uses: rust-build/rust-build.action@v1.4.0
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
with:
20+
RUSTTARGET: "x86_64-unknown-linux-musl"
21+
ARCHIVE_TYPES: "tar.gz tar.xz tar.zst"
22+
UPLOAD_MODE: none
23+
EXTRA_FILES: "README.md LICENSE"
24+
- name: Compile target x86_64-apple-darwin
25+
id: apple
2426
uses: rust-build/rust-build.action@v1.4.0
2527
env:
2628
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2729
with:
28-
RUSTTARGET: ${{ matrix.target }}
29-
ARCHIVE_TYPES: ${{ matrix.archive }}
30+
RUSTTARGET: "x86_64-apple-darwin"
31+
ARCHIVE_TYPES: zip
3032
UPLOAD_MODE: none
31-
- name: Upload artifact
32-
uses: actions/upload-artifact@v3
33+
- name: Compile target x86_64-pc-windows-gnu
34+
id: windows
35+
uses: rust-build/rust-build.action@v1.4.0
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
with:
39+
RUSTTARGET: "x86_64-pc-windows-gnu"
40+
ARCHIVE_TYPES: zip
41+
UPLOAD_MODE: none
42+
- name: "✏️ Generate release changelog"
43+
id: changelog
44+
uses: heinrichreimer/github-changelog-generator-action@v2.3
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
- name: Release
48+
uses: softprops/action-gh-release@v1
3349
with:
34-
name: Binary
35-
path: |
36-
${{ steps.compile.outputs.BUILT_ARCHIVE }}
37-
${{ steps.compile.outputs.BUILT_CHECKSUM }}
50+
body: ${{steps.changelog.outputs.changelog}}
51+
files: |
52+
${{ steps.linux_musl.outputs.BUILT_ARCHIVE }}
53+
${{ steps.linux_musl.outputs.BUILT_CHECKSUM }}
54+
${{ steps.apple.outputs.BUILT_ARCHIVE }}
55+
${{ steps.apple.outputs.BUILT_CHECKSUM }}
56+
${{ steps.windows.outputs.BUILT_ARCHIVE }}
57+
${{ steps.windows.outputs.BUILT_CHECKSUM }}
58+
README.md
59+
LICENSE

LICENCE renamed to LICENSE

File renamed without changes.

0 commit comments

Comments
 (0)