|
2 | 2 | name: Release |
3 | 3 |
|
4 | 4 | permissions: |
5 | | - contents: write |
6 | | - id-token: write |
7 | | - attestations: write |
| 5 | + contents: write |
| 6 | + id-token: write |
| 7 | + attestations: write |
8 | 8 |
|
9 | 9 | on: |
10 | | - release: |
11 | | - types: [created] |
| 10 | + release: |
| 11 | + types: [created] |
12 | 12 |
|
13 | 13 | env: |
14 | | - CARGO_TERM_COLOR: always |
| 14 | + CARGO_TERM_COLOR: always |
15 | 15 |
|
16 | 16 | jobs: |
17 | | - upload-assets: |
18 | | - strategy: |
19 | | - matrix: |
20 | | - include: |
21 | | - - target: x86_64-unknown-linux-gnu |
22 | | - os: ubuntu-latest |
23 | | - - target: x86_64-apple-darwin |
24 | | - os: macos-latest |
25 | | - - target: x86_64-pc-windows-msvc |
26 | | - os: windows-latest |
27 | | - runs-on: ${{ matrix.os }} |
28 | | - steps: |
29 | | - - uses: actions/checkout@v4 |
30 | | - - name: Get Dependencies (Linux) |
31 | | - shell: bash |
32 | | - run: sudo apt-get update && sudo apt-get install -y libudev-dev |
33 | | - if: startsWith(matrix.os, 'ubuntu') |
34 | | - # Nevermind :( |
35 | | - # After I got it working, I thought about it and realized that |
36 | | - # any subsequent releases (i.e. -pre.1) would be annoying. |
37 | | - # - name: Conditionally add -pre to built version number (Ubuntu) |
38 | | - # if: endsWith(github.event.release.tag_name, '-pre') && startsWith(matrix.os, 'ubuntu') |
39 | | - # run: sed -i -E 's/^(version = ")([^"]+)"/\1\2-pre"/' Cargo.toml |
40 | | - # - name: Conditionally add -pre to built version number (MacOS) |
41 | | - # if: endsWith(github.event.release.tag_name, '-pre') && startsWith(matrix.os, 'macos') |
42 | | - # run: sed -i '' -E 's/^(version = ")([^"]+)"/\1\2-pre"/' Cargo.toml |
43 | | - # - name: Conditionally add -pre to built version number (Windows) |
44 | | - # if: endsWith(github.event.release.tag_name, '-pre') && startsWith(matrix.os, 'windows') |
45 | | - # shell: pwsh |
46 | | - # run: (Get-Content Cargo.toml) -replace '^(version = ")([^"]+)(")', '${1}${2}-pre${3}' | Set-Content Cargo.toml |
47 | | - - name: Build and Publish yap-full |
48 | | - uses: taiki-e/upload-rust-binary-action@v1 |
49 | | - with: |
50 | | - bin: yap |
51 | | - features: yap-full |
52 | | - target: ${{ matrix.target }} |
53 | | - # include: LICENSE,README.md |
54 | | - tar: unix |
55 | | - zip: windows |
56 | | - archive: $bin-full-$tag-$target |
57 | | - token: ${{ secrets.GITHUB_TOKEN }} |
58 | | - checksum: sha512 |
59 | | - - name: Build and Publish yap-lite |
60 | | - uses: taiki-e/upload-rust-binary-action@v1 |
61 | | - with: |
62 | | - bin: yap |
63 | | - features: yap-lite |
64 | | - target: ${{ matrix.target }} |
65 | | - # include: LICENSE,README.md |
66 | | - tar: unix |
67 | | - zip: windows |
68 | | - archive: $bin-lite-$tag-$target |
69 | | - token: ${{ secrets.GITHUB_TOKEN }} |
70 | | - checksum: sha512 |
71 | | - # - uses: actions/attest-build-provenance@v1 |
72 | | - # with: |
73 | | - # subject-path: "**/*.tar.gz,**/*.zip" |
| 17 | + upload-assets: |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + include: |
| 21 | + - target: x86_64-unknown-linux-gnu |
| 22 | + os: ubuntu-latest |
| 23 | + - target: x86_64-apple-darwin |
| 24 | + os: macos-latest |
| 25 | + - target: x86_64-pc-windows-msvc |
| 26 | + os: windows-latest |
| 27 | + runs-on: ${{ matrix.os }} |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + - name: Get Dependencies (Linux) |
| 31 | + shell: bash |
| 32 | + run: sudo apt-get update && sudo apt-get install -y libudev-dev |
| 33 | + if: startsWith(matrix.os, 'ubuntu') |
| 34 | + # Nevermind :( |
| 35 | + # After I got it working, I thought about it and realized that |
| 36 | + # any subsequent releases (i.e. -pre.1) would be annoying. |
| 37 | + # - name: Conditionally add -pre to built version number (Ubuntu) |
| 38 | + # if: endsWith(github.event.release.tag_name, '-pre') && startsWith(matrix.os, 'ubuntu') |
| 39 | + # run: sed -i -E 's/^(version = ")([^"]+)"/\1\2-pre"/' Cargo.toml |
| 40 | + # - name: Conditionally add -pre to built version number (MacOS) |
| 41 | + # if: endsWith(github.event.release.tag_name, '-pre') && startsWith(matrix.os, 'macos') |
| 42 | + # run: sed -i '' -E 's/^(version = ")([^"]+)"/\1\2-pre"/' Cargo.toml |
| 43 | + # - name: Conditionally add -pre to built version number (Windows) |
| 44 | + # if: endsWith(github.event.release.tag_name, '-pre') && startsWith(matrix.os, 'windows') |
| 45 | + # shell: pwsh |
| 46 | + # run: (Get-Content Cargo.toml) -replace '^(version = ")([^"]+)(")', '${1}${2}-pre${3}' | Set-Content Cargo.toml |
| 47 | + - name: Build and Publish yap-full |
| 48 | + uses: taiki-e/upload-rust-binary-action@v1 |
| 49 | + with: |
| 50 | + bin: yap |
| 51 | + features: yap-full |
| 52 | + target: ${{ matrix.target }} |
| 53 | + include: LICENSE,README.md,example_configs |
| 54 | + tar: unix |
| 55 | + zip: windows |
| 56 | + archive: $bin-full-$tag-$target |
| 57 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 58 | + checksum: sha512 |
| 59 | + - name: Build and Publish yap-lite |
| 60 | + uses: taiki-e/upload-rust-binary-action@v1 |
| 61 | + with: |
| 62 | + bin: yap |
| 63 | + features: yap-lite |
| 64 | + target: ${{ matrix.target }} |
| 65 | + include: LICENSE,README.md,example_configs |
| 66 | + tar: unix |
| 67 | + zip: windows |
| 68 | + archive: $bin-lite-$tag-$target |
| 69 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 70 | + checksum: sha512 |
| 71 | + # - uses: actions/attest-build-provenance@v1 |
| 72 | + # with: |
| 73 | + # subject-path: "**/*.tar.gz,**/*.zip" |
0 commit comments