From 8767944aba8ebfea70d42027487c162e1f9e1f35 Mon Sep 17 00:00:00 2001 From: Sett17 Date: Wed, 2 Aug 2023 00:44:41 +0200 Subject: [PATCH] fix(ci): update GitHub Actions workflows This commit updates the GitHub Actions workflow for releases. The changes include: - Upgrading the `actions/checkout` action to version 3 - Adding caching for Chocolatey packages - Replacing the `actions/create-release` and `actions/upload-release-asset` actions with the `softprops/action-gh-release` action - Updating the release step to use the `softprops/action-gh-release` action instead of the deprecated `actions/create-release` action --- .github/workflows/release.yml | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 28d511d..6e49b4f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,13 +4,22 @@ on: push: tags: - '*' + workflow_dispatch: jobs: build: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + + - name: Cache Choco packages + uses: actions/cache@v3 + with: + path: ~\AppData\Local\Temp\chocolatey + key: ${{ runner.os }}-choco-${{ hashFiles('**/*.yml') }} + restore-keys: | + ${{ runner.os }}-choco- - name: Install dependencies run: | @@ -31,24 +40,7 @@ jobs: cd build make - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - - name: Upload Release Asset - id: upload_release_asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Release + uses: softprops/action-gh-release@v1 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./build/SynthPointer.dll - asset_name: SynthPointer.dll - asset_content_type: application/octet-stream + files: ./build/SynthPointer.dll