This repository was archived by the owner on Apr 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (72 loc) · 2.49 KB
/
Copy pathrelease.yml
File metadata and controls
75 lines (72 loc) · 2.49 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CD Native
# https://github.com/r-darwish/topgrade/blob/020a0619b87e657ec71529dcd2da7b53a5b152ce/.github/workflows/release.yml
on:
release:
types: [ created ]
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.62.0
profile: minimal
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1.0.1
name: Check format
with:
command: fmt
args: --all -- --check
- uses: actions-rs/cargo@v1.0.1
name: Run clippy
with:
command: clippy
args: --all-targets --locked -- -D warnings
- uses: actions-rs/cargo@v1.0.1
name: Run clippy (All features)
with:
command: clippy
args: --all-targets --locked --all-features -- -D warnings
- uses: actions-rs/cargo@v1.0.1
name: Run tests
with:
command: test
- uses: actions-rs/cargo@v1.0.1
name: Build
with:
command: build
args: --release --all-features
- name: Rename Release (Unix)
run: |
cargo install default-target
mkdir release-assets
FILENAME=northstar_dev_testing_helper_tool_bin-${{github.event.release.tag_name}}-$(default-target)
mv target/release/northstar_dev_testing_helper_tool_bin release-assets
cd release-assets
tar --format=ustar -czf $FILENAME.tar.gz northstar_dev_testing_helper_tool_bin
rm northstar_dev_testing_helper_tool_bin
ls .
if: ${{ matrix.platform != 'windows-latest' }}
shell: bash
- name: Rename Release (Windows)
run: |
cargo install default-target
mkdir release-assets
FILENAME=northstar_dev_testing_helper_tool_bin-${{github.event.release.tag_name}}-$(default-target)
mv target/release/northstar_dev_testing_helper_tool_bin.exe release-assets/northstar_dev_testing_helper_tool_bin.exe
cd release-assets
powershell Compress-Archive -Path * -Destination ${FILENAME}.zip
rm northstar_dev_testing_helper_tool_bin.exe
ls .
if: ${{ matrix.platform == 'windows-latest' }}
shell: bash
- name: Release
uses: softprops/action-gh-release@v1
with:
files: release-assets/*