diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a9f5f00..ef67bf4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -33,7 +33,9 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + persist-credentials: false # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/make-dist.sh b/.github/workflows/make-dist.sh index 46c9f0a..2a64e8f 100755 --- a/.github/workflows/make-dist.sh +++ b/.github/workflows/make-dist.sh @@ -21,8 +21,8 @@ else fi archive=dvdisaster-$(echo "$github_ref" | grep -Eo '[^/]+$')-$suffix.zip -echo "Archive name is $archive" -echo "::set-output name=archive::$archive" +[ -n "$GITHUB_OUTPUT" ] && echo "archive=$archive" >> "$GITHUB_OUTPUT" +echo "appimage is <$archive>" mkdir -p dist/locale cp -vr locale/*/ dist/locale/ @@ -48,4 +48,4 @@ if command -v zip >/dev/null; then zip -9r $archive ${archive/.zip/} mv ${archive/.zip/} dist fi -echo "dist done ($archive)" \ No newline at end of file +echo "dist done ($archive)" diff --git a/.github/workflows/make-mac-app.sh b/.github/workflows/make-mac-app.sh index cd341bb..3e85558 100755 --- a/.github/workflows/make-mac-app.sh +++ b/.github/workflows/make-mac-app.sh @@ -11,8 +11,8 @@ else fi archive="dvdisaster-$(echo "$github_ref" | grep -Eo '[^/]+$')$suffix.dmg" -echo "Archive name is $archive" -echo "::set-output name=archive::$archive" +[ -n "$GITHUB_OUTPUT" ] && echo "archive=$archive" >> "$GITHUB_OUTPUT" +echo "mac dmg is <$archive>" mkdir -p dist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ed03f7..279681b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,9 @@ name: autobuild on: - release: - types: [published] + push: + tags: + - "v*" jobs: mac: @@ -14,7 +15,9 @@ jobs: - ui: cli clionly: --with-gui=no steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + persist-credentials: false - name: install prerequisites env: HOMEBREW_NO_INSTALL_CLEANUP: 1 @@ -45,16 +48,11 @@ jobs: - name: build dist run: ./.github/workflows/make-mac-app.sh ${{ github.ref }} id: dist - - 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: ${{ github.event.release.upload_url }} - asset_path: ./${{ steps.dist.outputs.archive }} - asset_name: ${{ steps.dist.outputs.archive }} - asset_content_type: application/zip + files: ${{ steps.dist.outputs.archive }} + draft: true win: runs-on: windows-latest @@ -86,7 +84,9 @@ jobs: - name: git config run: git config --global core.autocrlf input shell: bash - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + persist-credentials: false - name: configure run: ./configure ${{ matrix.clionly }} - name: make @@ -111,21 +111,18 @@ jobs: run: | cd dist dvdisaster.exe --version - - 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: ${{ github.event.release.upload_url }} - asset_path: ./${{ steps.dist.outputs.archive }} - asset_name: ${{ steps.dist.outputs.archive }} - asset_content_type: application/zip + files: ${{ steps.dist.outputs.archive }} + draft: true linux64-cli: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + persist-credentials: false - name: install prerequisites run: sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man - name: configure @@ -140,21 +137,18 @@ jobs: - name: build dist run: ./.github/workflows/make-dist.sh ${{ github.ref }} id: dist - - 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: ${{ github.event.release.upload_url }} - asset_path: ./${{ steps.dist.outputs.archive }} - asset_name: ${{ steps.dist.outputs.archive }} - asset_content_type: application/zip + files: ${{ steps.dist.outputs.archive }} + draft: true linux64-appimage: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + persist-credentials: false - name: install prerequisites on host run: sudo apt-get update && sudo apt-get install -y fuse - name: docker @@ -196,15 +190,10 @@ jobs: run: | chmod 755 dvdisaster*.AppImage && ./dvdisaster*.AppImage --version archive=$(ls -1 dvdisaster*.AppImage) - echo "::set-output name=archive::$archive" + echo "archive=$archive" >> "$GITHUB_OUTPUT" echo "appimage is <$archive>" - - 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: ${{ github.event.release.upload_url }} - asset_path: ./${{ steps.dist.outputs.archive }} - asset_name: ${{ steps.dist.outputs.archive }} - asset_content_type: application/octet-stream + files: ${{ steps.dist.outputs.archive }} + draft: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 31bc702..c88d4b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,9 @@ jobs: - printf: fmtdbg debugprintf: --with-debug-printf-format steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + persist-credentials: false - name: install prerequisites env: HOMEBREW_NO_INSTALL_CLEANUP: 1 @@ -83,7 +85,9 @@ jobs: - name: git config run: git config --global core.autocrlf input shell: bash - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + persist-credentials: false - name: configure run: | echo running ./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror @@ -126,7 +130,9 @@ jobs: - printf: fmtdbg debugprintf: --with-debug-printf-format steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + persist-credentials: false - name: install prerequisites env: DEBIAN_FRONTEND: noninteractive