diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 672f5b7269..d43e01b0cc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,10 +57,20 @@ jobs: github.event.head_commit.message == 'increment build number' && github.ref_name == 'master' run: | - mv gen/Firebird-[0-9]*.tar.gz gen/Firebird-linux-amd64.tar.gz - mv gen/Firebird-debuginfo-*.tar.gz gen/Firebird-linux-amd64-debuginfo.tar.gz echo "::set-output name=snapshot_name::${{ github.ref_name }}" + - name: Snapshot - delete old assets + uses: asfernandes/delete-release-assets@v2 + if: steps.snapshot_prepare.outputs.snapshot_name + with: + repository: FirebirdSQL/snapshots + token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} + tag: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} + fail-if-no-release: false + fail-if-no-assets: false + assets: | + Firebird-*amd64.tar.gz + - name: Snapshot - release id: snapshot_release_try1 uses: softprops/action-gh-release@v1 @@ -68,12 +78,12 @@ jobs: continue-on-error: true with: repository: FirebirdSQL/snapshots - name: Latest snapshot for ${{ steps.snapshot_prepare.outputs.snapshot_name }} + name: Latest snapshots for ${{ steps.snapshot_prepare.outputs.snapshot_name }} tag_name: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} prerelease: true token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} files: | - gen/Firebird-*.tar.gz + gen/Firebird-*amd64.tar.gz - name: Snapshot - release (retry) uses: softprops/action-gh-release@v1 @@ -82,12 +92,12 @@ jobs: steps.snapshot_release_try1.outcome == 'failure' with: repository: FirebirdSQL/snapshots - name: Latest snapshot for ${{ steps.snapshot_prepare.outputs.snapshot_name }} + name: Latest snapshots for ${{ steps.snapshot_prepare.outputs.snapshot_name }} tag_name: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} prerelease: true token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} files: | - gen/Firebird-*.tar.gz + gen/Firebird-*amd64.tar.gz build-linux-docker-x86: runs-on: ubuntu-20.04 @@ -115,10 +125,20 @@ jobs: github.event.head_commit.message == 'increment build number' && github.ref_name == 'master' run: | - mv gen/Firebird-[0-9]*.tar.gz gen/Firebird-linux-i586.tar.gz - mv gen/Firebird-debuginfo-*.tar.gz gen/Firebird-linux-i586-debuginfo.tar.gz echo "::set-output name=snapshot_name::${{ github.ref_name }}" + - name: Snapshot - delete old assets + uses: asfernandes/delete-release-assets@v2 + if: steps.snapshot_prepare.outputs.snapshot_name + with: + repository: FirebirdSQL/snapshots + token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} + tag: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} + fail-if-no-release: false + fail-if-no-assets: false + assets: | + Firebird-*i586.tar.gz + - name: Snapshot - release id: snapshot_release_try1 uses: softprops/action-gh-release@v1 @@ -126,12 +146,12 @@ jobs: continue-on-error: true with: repository: FirebirdSQL/snapshots - name: Latest snapshot for ${{ steps.snapshot_prepare.outputs.snapshot_name }} + name: Latest snapshots for ${{ steps.snapshot_prepare.outputs.snapshot_name }} tag_name: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} prerelease: true token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} files: | - gen/Firebird-*.tar.gz + gen/Firebird-*i586.tar.gz - name: Snapshot - release (retry) uses: softprops/action-gh-release@v1 @@ -140,12 +160,12 @@ jobs: steps.snapshot_release_try1.outcome == 'failure' with: repository: FirebirdSQL/snapshots - name: Latest snapshot for ${{ steps.snapshot_prepare.outputs.snapshot_name }} + name: Latest snapshots for ${{ steps.snapshot_prepare.outputs.snapshot_name }} tag_name: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} prerelease: true token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} files: | - gen/Firebird-*.tar.gz + gen/Firebird-*i586.tar.gz build-alpine-x64: runs-on: ubuntu-20.04 @@ -289,10 +309,22 @@ jobs: run: | if "%PLATFORM%" == "x64" set FB_OUTPUT_SUFFIX=x64 if "%PLATFORM%" == "x86" set FB_OUTPUT_SUFFIX=Win32 - ren builds\install_images\*.zip Firebird-windows-%FB_OUTPUT_SUFFIX%.zip - ren builds\install_images\*.exe Firebird-windows-%FB_OUTPUT_SUFFIX%.exe + echo ::set-output name=arch_suffix::%FB_OUTPUT_SUFFIX% echo ::set-output name=snapshot_name::${{ github.ref_name }} + - name: Snapshot - delete old assets + uses: asfernandes/delete-release-assets@v2 + if: steps.snapshot_prepare.outputs.snapshot_name + with: + repository: FirebirdSQL/snapshots + token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} + tag: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} + fail-if-no-release: false + fail-if-no-assets: false + assets: | + Firebird-*${{ steps.snapshot_prepare.outputs.arch_suffix }}*.exe + Firebird-*${{ steps.snapshot_prepare.outputs.arch_suffix }}*.zip + - name: Snapshot - release id: snapshot_release_try1 uses: softprops/action-gh-release@v1 @@ -300,7 +332,7 @@ jobs: continue-on-error: true with: repository: FirebirdSQL/snapshots - name: Latest snapshot for ${{ steps.snapshot_prepare.outputs.snapshot_name }} + name: Latest snapshots for ${{ steps.snapshot_prepare.outputs.snapshot_name }} tag_name: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} prerelease: true token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} @@ -315,7 +347,7 @@ jobs: steps.snapshot_release_try1.outcome == 'failure' with: repository: FirebirdSQL/snapshots - name: Latest snapshot for ${{ steps.snapshot_prepare.outputs.snapshot_name }} + name: Latest snapshots for ${{ steps.snapshot_prepare.outputs.snapshot_name }} tag_name: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} prerelease: true token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} @@ -458,9 +490,20 @@ jobs: github.event.head_commit.message == 'increment build number' && github.ref_name == 'master' run: | - mv gen/artifacts/Firebird-*.pkg gen/artifacts/Firebird-macos-x86_64.pkg echo "::set-output name=snapshot_name::${{ github.ref_name }}" + - name: Snapshot - delete old assets + uses: asfernandes/delete-release-assets@v2 + if: steps.snapshot_prepare.outputs.snapshot_name + with: + repository: FirebirdSQL/snapshots + token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} + tag: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} + fail-if-no-release: false + fail-if-no-assets: false + assets: | + Firebird-*x86_64.pkg + - name: Snapshot - release id: snapshot_release_try1 uses: softprops/action-gh-release@v1 @@ -468,12 +511,12 @@ jobs: continue-on-error: true with: repository: FirebirdSQL/snapshots - name: Latest snapshot for ${{ steps.snapshot_prepare.outputs.snapshot_name }} + name: Latest snapshots for ${{ steps.snapshot_prepare.outputs.snapshot_name }} tag_name: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} prerelease: true token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} files: | - gen/artifacts/Firebird-*.pkg + gen/artifacts/Firebird-*x86_64.pkg - name: Snapshot - release (retry) uses: softprops/action-gh-release@v1 @@ -482,9 +525,9 @@ jobs: steps.snapshot_release_try1.outcome == 'failure' with: repository: FirebirdSQL/snapshots - name: Latest snapshot for ${{ steps.snapshot_prepare.outputs.snapshot_name }} + name: Latest snapshots for ${{ steps.snapshot_prepare.outputs.snapshot_name }} tag_name: snapshot-${{ steps.snapshot_prepare.outputs.snapshot_name }} prerelease: true token: ${{ secrets.SNAPSHOT_RELEASE_TOKEN }} files: | - gen/artifacts/Firebird-*.pkg + gen/artifacts/Firebird-*x86_64.pkg