Skip to content

Commit 422a299

Browse files
Update release.yml
1 parent 6499d60 commit 422a299

1 file changed

Lines changed: 11 additions & 39 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
version:
1919
runs-on: ubuntu-latest
2020
outputs:
21-
version: ${{ steps.get_version.outputs.version }}
21+
version: ${{ steps.v.outputs.version }}
2222
steps:
2323
- uses: actions/checkout@v4
24-
- id: get_version
24+
- id: v
2525
run: |
2626
V=$(grep '^version' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
2727
echo "version=$V" >> $GITHUB_OUTPUT
@@ -37,45 +37,32 @@ jobs:
3737
osname: linux
3838
ext: ""
3939
pack: tar
40-
- os: ubuntu-latest
41-
target: x86_64-unknown-linux-musl
42-
bin: pyelevate
43-
osname: linux-musl
44-
ext: ""
45-
pack: tar
46-
- os: macos-latest
47-
target: x86_64-apple-darwin
48-
bin: pyelevate
49-
osname: macos-x86_64
50-
ext: ""
51-
pack: tar
52-
- os: macos-latest
53-
target: aarch64-apple-darwin
54-
bin: pyelevate
55-
osname: macos-arm64
56-
ext: ""
57-
pack: tar
40+
5841
- os: windows-latest
5942
target: x86_64-pc-windows-msvc
6043
bin: pyelevate.exe
6144
osname: windows
6245
ext: ".exe"
6346
pack: zip
6447

48+
- os: macos-latest
49+
target: aarch64-apple-darwin
50+
bin: pyelevate
51+
osname: macos-arm64
52+
ext: ""
53+
pack: tar
54+
6555
runs-on: ${{ matrix.os }}
6656

6757
steps:
6858
- uses: actions/checkout@v4
6959
- uses: dtolnay/rust-toolchain@stable
7060
- uses: Swatinem/rust-cache@v2
7161

72-
- if: ${{ matrix.os == 'ubuntu-latest' }}
73-
run: sudo apt-get update && sudo apt-get install -y musl-tools build-essential
74-
7562
- run: rustup target add ${{ matrix.target }}
7663
- run: cargo build --release --target ${{ matrix.target }}
7764

78-
- name: Package binary
65+
- name: Package binary (flat archive)
7966
shell: bash
8067
run: |
8168
NAME=pyelevate-v${{ needs.version.outputs.version }}-${{ matrix.osname }}
@@ -106,21 +93,6 @@ jobs:
10693
with:
10794
path: artifacts
10895

109-
- name: Create checksums manifest
110-
run: |
111-
echo "# PyElevate Release Checksums (SHA256)" > artifacts/CHECKSUMS.md
112-
echo "" >> artifacts/CHECKSUMS.md
113-
echo "**Release:** v${{ needs.version.outputs.version }}" >> artifacts/CHECKSUMS.md
114-
echo "" >> artifacts/CHECKSUMS.md
115-
for f in artifacts/*.sha256; do
116-
echo "### $(basename ${f%.*})" >> artifacts/CHECKSUMS.md
117-
echo '```' >> artifacts/CHECKSUMS.md
118-
cat "$f" >> artifacts/CHECKSUMS.md
119-
echo '```' >> artifacts/CHECKSUMS.md
120-
echo "" >> artifacts/CHECKSUMS.md
121-
done
122-
cat artifacts/CHECKSUMS.md
123-
12496
- uses: softprops/action-gh-release@v2
12597
with:
12698
tag_name: v${{ needs.version.outputs.version }}

0 commit comments

Comments
 (0)