diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15115d7..909a22c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,8 @@ jobs: needs: build-and-test if: github.event_name == 'release' runs-on: windows-latest + permissions: + contents: write steps: - uses: actions/checkout@v4 @@ -46,15 +48,11 @@ jobs: - name: Publish run: dotnet publish MyLibrary/MyLibrary.csproj -c Release -r win-x64 --self-contained -o publish/win - - name: Get version - id: version + - name: Pack with Velopack run: | $version = "${{ github.event.release.tag_name }}" -replace '^v', '' - echo "VERSION=$version" >> $env:GITHUB_OUTPUT + vpk pack -u MyLibrary -v $version -p publish/win -e MyLibrary.exe shell: pwsh - - name: Pack with Velopack - run: vpk pack -u MyLibrary -v ${{ steps.version.outputs.VERSION }} -p publish/win -e MyLibrary.exe - - name: Upload to GitHub Release run: vpk upload github --repoUrl https://github.com/edwardyum/MyLibrary --token ${{ secrets.GITHUB_TOKEN }} --tag ${{ github.event.release.tag_name }} \ No newline at end of file