Skip to content

Commit 50c6463

Browse files
committed
added basic permission in github actions.
1 parent 57e8800 commit 50c6463

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

.github/workflows/publish.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ name: Publish
33
on:
44
push:
55
tags:
6-
- '*'
6+
- "*"
77

8+
permissions:
9+
contents: write
810
jobs:
911
publish:
1012
name: Publish for ${{ matrix.os }}
1113
runs-on: ${{ matrix.os }}
1214
strategy:
1315
matrix:
14-
name: [
15-
linux,
16-
windows,
17-
macos
18-
]
16+
name: [linux, windows, macos]
1917

2018
include:
2119
- name: linux
@@ -32,20 +30,20 @@ jobs:
3230
asset_name: sthp-macos
3331

3432
steps:
35-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v4
3634

37-
- uses: actions-rs/toolchain@v1
38-
with:
39-
profile: minimal
40-
toolchain: stable
35+
- uses: actions-rs/toolchain@v1
36+
with:
37+
profile: minimal
38+
toolchain: stable
4139

42-
- name: Build
43-
run: cargo build --release --locked
40+
- name: Build
41+
run: cargo build --release --locked
4442

45-
- name: Upload binaries to release
46-
uses: svenstaro/upload-release-action@v2
47-
with:
48-
repo_token: ${{ secrets.TOKEN_FOR_RELEASE }}
49-
file: target/release/${{ matrix.artifact_name }}
50-
asset_name: ${{ matrix.asset_name }}
51-
tag: ${{ github.ref }}
43+
- name: Upload binaries to release
44+
uses: svenstaro/upload-release-action@v2
45+
with:
46+
repo_token: ${{ secrets.TOKEN_FOR_RELEASE }}
47+
file: target/release/${{ matrix.artifact_name }}
48+
asset_name: ${{ matrix.asset_name }}
49+
tag: ${{ github.ref }}

0 commit comments

Comments
 (0)