diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 437a7812e..7cd7ef531 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,6 @@ on: jobs: nuget: - if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -27,20 +26,19 @@ jobs: run: nuget push *.nupkg -Source 'https://api.nuget.org/v3/index.json' release-asset: + if: github.event_name != 'workflow_dispatch' runs-on: ubuntu-latest - env: - NAME: jwt-cpp-${{ github.event.release.tag_name }} steps: - uses: actions/checkout@v4 - - run: tar -czf /tmp/$NAME.tar.gz . + - run: tar --exclude='./.git' -vczf /tmp/jwt-cpp-${{ github.event.release.tag_name }}.tar.gz . - uses: shogo82148/actions-upload-release-asset@v1 with: upload_url: ${{ github.event.release.upload_url }} - asset_path: /tmp/$NAME.tar.gz + asset_path: /tmp/jwt-cpp-${{ github.event.release.tag_name }}.tar.gz - - run: zip -r /tmp/$NAME.zip . + - run: zip -x './.git/*' -r /tmp/jwt-cpp-${{ github.event.release.tag_name }}.zip . - uses: shogo82148/actions-upload-release-asset@v1 with: upload_url: ${{ github.event.release.upload_url }} - asset_path: /tmp/$NAME.zip + asset_path: /tmp/jwt-cpp-${{ github.event.release.tag_name }}.zip