From bdb04afb02971b758d6b3e4be57bb2220b370573 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 18 Jun 2021 23:01:32 +1000 Subject: [PATCH 1/3] fixes for release --- .github/workflows/release.yml | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64547855cf6e..b8602bbc8fa1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,25 +60,11 @@ jobs: - name: Get tag name id: get_tag_name - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}-release + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') with: - tag_name: ${{ steps.get_tag_name.outputs.VERSION }} - release_name: Release ${{ steps.get_tag_name.outputs.VERSION }} - draft: false - prerelease: false - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{secrets.RELEASE_TOKEN}} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./invoiceninja.zip - asset_name: invoiceninja.zip - asset_content_type: application/zip + files: | + invoiceninja.zip \ No newline at end of file From 5c1614d3f831eed18b877822ab6d709d9d5632d6 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 18 Jun 2021 23:06:39 +1000 Subject: [PATCH 2/3] Fixes for release script --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8602bbc8fa1..6d3a20e0fb00 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,6 +65,8 @@ jobs: - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: files: | invoiceninja.zip \ No newline at end of file From b500073a9ba795af430f2d9d8adf67cdbe40d061 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 18 Jun 2021 23:15:20 +1000 Subject: [PATCH 3/3] Clean up for releases --- .github/workflows/release.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d3a20e0fb00..1a2953163f39 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,19 +49,11 @@ jobs: sudo rm -rf bootstrap/cache/* sudo rm -rf node_modules sudo rm -rf .git - # - name: Prune Git History - # run: | - # sudo git gc - # sudo git gc --aggressive - # sudo git prune - - name: Build project # This would actually build your project, using zip for an example artifact + + - name: Build project run: | zip -r ./invoiceninja.zip .* -x "../*" - - name: Get tag name - id: get_tag_name - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/')