Skip to content

Commit fcd266c

Browse files
committed
Fixed: Workflow
1 parent 2b64b07 commit fcd266c

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
jobs:
1010
build-linux:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
1214
steps:
1315
- name: Checkout repository
1416
uses: actions/checkout@v4
@@ -17,6 +19,7 @@ jobs:
1719
uses: actions-rs/toolchain@v1
1820
with:
1921
toolchain: stable
22+
targets: x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu
2023

2124
- name: Run tests
2225
run: cargo test --verbose
@@ -34,21 +37,21 @@ jobs:
3437
- name: Archive source code as tar.gz
3538
run: |
3639
mkdir -p target/source
37-
git archive --format=tar.gz -o target/source/evremap-${GITHUB_REF##*/}.tar.gz HEAD
40+
git archive --format=tar.gz -o target/source/evremap-${{ github.ref_name }}.tar.gz HEAD
3841
3942
- name: Archive source code as zip
4043
run: |
4144
mkdir -p target/source
42-
git archive --format=zip -o target/source/evremap-${GITHUB_REF##*/}.zip HEAD
45+
git archive --format=zip -o target/source/evremap-${{ github.ref_name }}.zip HEAD
4346
4447
- name: Create GitHub release
4548
id: create-release
4649
uses: actions/create-release@v1
4750
env:
4851
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4952
with:
50-
tag_name: ${{ github.ref }}
51-
release_name: Release ${{ github.ref }}
53+
tag_name: ${{ github.ref_name }}
54+
release_name: Release ${{ github.ref_name }}
5255
body: ''
5356
draft: false
5457
prerelease: true
@@ -100,6 +103,8 @@ jobs:
100103
build-macos:
101104
needs: build-linux
102105
runs-on: macos-latest
106+
permissions:
107+
contents: write
103108
steps:
104109
- name: Checkout repository
105110
uses: actions/checkout@v4
@@ -121,7 +126,7 @@ jobs:
121126
env:
122127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123128
with:
124-
upload_url: ${{ steps.create-release.outputs.upload_url }}
129+
upload_url: ${{ github.event.release.upload_url }}
125130
asset_path: target/x86_64-apple-darwin/release/evremap
126131
asset_name: evremap-x86_64-apple-darwin
127132
asset_content_type: application/octet-stream
@@ -131,7 +136,7 @@ jobs:
131136
env:
132137
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
133138
with:
134-
upload_url: ${{ steps.create-release.outputs.upload_url }}
139+
upload_url: ${{ github.event.release.upload_url }}
135140
asset_path: target/aarch64-apple-darwin/release/evremap
136141
asset_name: evremap-aarch64-apple-darwin
137142
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)