diff --git a/.github/workflows/buildall.yml b/.github/workflows/buildall.yml index e914bbd5..362ee9de 100644 --- a/.github/workflows/buildall.yml +++ b/.github/workflows/buildall.yml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} + release_id: ${{ steps.create_release.outputs.id }} ver: ${{ steps.info.outputs.ver }} sha: ${{ steps.info.outputs.sha }} steps: @@ -21,12 +22,12 @@ jobs: id: short-sha with: length: 7 -# - uses: dev-drprasad/delete-older-releases@v0.2.0 -# with: -# keep_latest: 4 -# delete_tags: true -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: dev-drprasad/delete-older-releases@v0.2.0 + with: + keep_latest: 5 + delete_tags: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: info id: info env: @@ -44,12 +45,12 @@ jobs: with: tag_name: ${{ steps.info.outputs.ver }}-${{ steps.info.outputs.sha }} release_name: ${{ steps.info.outputs.ver }}-${{ steps.info.outputs.sha }} - draft: false + draft: true prerelease: false - build_linux64: - needs: [prepare] + build_linux: + needs: [prepare,finalize] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -66,7 +67,7 @@ jobs: - name: make working-directory: ./build run: make - - name: data + - ƒname: data working-directory: ./build run: mv ../GLSMAC_data bin/ - name: pack @@ -85,12 +86,12 @@ jobs: with: upload_url: ${{ needs.prepare.outputs.upload_url }} asset_path: ./build/GLSMAC.tar.gz - asset_name: GLSMAC-${{ needs.prepare.ver }}-linux64-${{ needs.prepare.sha }}.tar.gz + asset_name: GLSMAC-${{ needs.prepare.outputs.ver }}-linux64-${{ needs.prepare.outputs.sha }}.tar.gz asset_content_type: application/gzip - build_windows64: - needs: [prepare] + build_windows: + needs: [prepare,finalize] runs-on: windows-latest steps: - uses: actions/checkout@v3 @@ -111,7 +112,6 @@ jobs: run: mv ../GLSMAC_data bin/ - name: pack working-directory: ./build/bin -# run: tar -C bin -zcvf GLSMAC.tar.gz GLSMAC.exe GLSMAC_data run: Compress-Archive -Path GLSMAC.exe,GLSMAC_data -Destination ../GLSMAC.zip - name: publish uses: actions/upload-artifact@v3 @@ -126,5 +126,18 @@ jobs: with: upload_url: ${{ needs.prepare.outputs.upload_url }} asset_path: ./build/GLSMAC.zip - asset_name: GLSMAC-${{ needs.prepare.outputs.ver }}-windows64-${{ needs.prepare.outputs.sha }}.zip + asset_name: GLSMAC-${{ needs.prepare.outputs.ver }}-win64-${{ needs.prepare.outputs.sha }}.zip asset_content_type: application/gzip + + finalize: +# needs: [prepare,build_linux,build_windows] + needs: [prepare] + runs-on: ubuntu-latest + steps: + - name: update-release + uses: actions/edit-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + id: ${{ needs.prepare.outputs.release_id }} + draft: false