From 50c64637a376327e32f4e14cc4390b41e4090eaa Mon Sep 17 00:00:00 2001 From: Karan Gauswami Date: Sun, 21 Sep 2025 16:41:31 +0530 Subject: [PATCH] added basic permission in github actions. --- .github/workflows/publish.yml | 38 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0ab5ebf..0085ae4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,19 +3,17 @@ name: Publish on: push: tags: - - '*' + - "*" +permissions: + contents: write jobs: publish: name: Publish for ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: - name: [ - linux, - windows, - macos - ] + name: [linux, windows, macos] include: - name: linux @@ -32,20 +30,20 @@ jobs: asset_name: sthp-macos steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable - - name: Build - run: cargo build --release --locked + - name: Build + run: cargo build --release --locked - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.TOKEN_FOR_RELEASE }} - file: target/release/${{ matrix.artifact_name }} - asset_name: ${{ matrix.asset_name }} - tag: ${{ github.ref }} + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.TOKEN_FOR_RELEASE }} + file: target/release/${{ matrix.artifact_name }} + asset_name: ${{ matrix.asset_name }} + tag: ${{ github.ref }}