From 693bcedf53eddbb19c8e8e838a3fd5b5c98c4b78 Mon Sep 17 00:00:00 2001 From: Seiry Yu Date: Tue, 2 Apr 2024 17:54:17 +0800 Subject: [PATCH] Update release workflow permissions and add release step --- .github/workflows/release.yml | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b104a36..564d0c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,12 +1,13 @@ --- name: Download, unzip, test & package latest AirConnect release on: - workflow_dispatch: - push: - branches: ["master"] - pull_request: - branches: ["master"] -permissions: read-all + release: + types: [published] + +permissions: + contents: write + discussions: write + jobs: build: runs-on: ubuntu-latest @@ -31,18 +32,6 @@ jobs: fileName: "AirConnect*.zip" out-file-path: "src/dsm7/bin" extract: true - - name: check bin format - run: | - sudo apt update - sudo apt-get install file - cd "${GITHUB_WORKSPACE}"/src/dsm7/bin/ - ls -al - file airupnp-linux-x86_64 - - # - name: Set up Upterm - # id: upterm - # uses: lhotari/action-upterm@v1 - - name: Test downloaded Release id: test_release run: | @@ -72,6 +61,12 @@ jobs: id: check_created_packages run: ls -ltR "${GITHUB_WORKSPACE}"/src/dsm7/dist/ + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: | + src/dsm7/dist/*.spk + - name: Upload releases to artifacts id: upload_releases uses: actions/upload-artifact@v4