From 5880e0af86891f39441de998ce5d8f547db94f28 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 12:46:45 -0700 Subject: [PATCH] using packagr actions for publishing artifacts. --- .github/workflows/release.yaml | 223 ++++++++++++++------------------- 1 file changed, 97 insertions(+), 126 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9a97b40..a6393d1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -51,154 +51,125 @@ jobs: cd $PROJECT_PATH make all - - name: Commit - uses: EndBug/add-and-commit@v4 # You can change this to use a specific version - with: - - author_name: Jason Kulatunga - author_email: jason@thesparktree.com - cwd: ${{ env.PROJECT_PATH }} - force: false - signoff: true - message: '(${{steps.bump_version.outputs.release_version}}) Automated packaging of release by Packagr' - tag: ${{steps.bump_version.outputs.release_version}} + - name: Commit Changes + id: commit + uses: packagrio/action-releasr-go@master env: + # This is necessary in order to push a commit to the repo GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} - with: - tag_name: ${{ steps.bump_version.outputs.release_version }} - release_name: Release ${{ steps.bump_version.outputs.release_version }} - draft: false - prerelease: false - - - name: Release Asset - Web - linux-amd64 - id: upload-release-asset1 - uses: actions/upload-release-asset@v1 + - name: Publish Release + id: publish + uses: packagrio/action-publishr-go@master env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-web-linux-amd64 - asset_name: scrutiny-web-linux-amd64 - asset_content_type: application/octet-stream - - name: Release Asset - Collector - linux-amd64 - id: upload-release-asset2 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + # This is necessary in order to push a commit to the repo + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged 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: /build/scrutiny-collector-metrics-linux-amd64 - asset_name: scrutiny-collector-metrics-linux-amd64 - asset_content_type: application/octet-stream + upload_assets: '/build/scrutiny-web-linux-amd64 /build/scrutiny-collector-metrics-linux-amd64 /build/scrutiny-web-linux-arm64 /build/scrutiny-collector-metrics-linux-arm64 /build/scrutiny-web-linux-arm-5 /build/scrutiny-collector-metrics-linux-arm-5 /build/scrutiny-web-linux-arm-6 /build/scrutiny-collector-metrics-linux-arm-6 /build/scrutiny-web-linux-arm-7 /build/scrutiny-collector-metrics-linux-arm-7' - - name: Release Asset - Web - linux-arm64 - id: upload-release-asset3 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-web-linux-arm64 - asset_name: scrutiny-web-linux-arm64 - asset_content_type: application/octet-stream - - name: Release Asset - Collector - linux-arm64 - id: upload-release-asset4 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-collector-metrics-linux-arm64 - asset_name: scrutiny-collector-metrics-linux-arm64 - asset_content_type: application/octet-stream +# - name: Release Asset - Web - linux-amd64 +# id: upload-release-asset1 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-web-linux-amd64 +# asset_name: scrutiny-web-linux-amd64 +# asset_content_type: application/octet-stream +# - name: Release Asset - Collector - linux-amd64 +# id: upload-release-asset2 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-collector-metrics-linux-amd64 +# asset_name: scrutiny-collector-metrics-linux-amd64 +# asset_content_type: application/octet-stream - - name: Release Asset - Web - linux-arm-5 - id: upload-release-asset5 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-web-linux-arm-5 - asset_name: scrutiny-web-linux-arm-5 - asset_content_type: application/octet-stream - - name: Release Asset - Collector - linux-arm-5 - id: upload-release-asset6 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-collector-metrics-linux-arm-5 - asset_name: scrutiny-collector-metrics-linux-arm-5 - asset_content_type: application/octet-stream - - name: Release Asset - Web - linux-arm-6 - id: upload-release-asset7 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-web-linux-arm-6 - asset_name: scrutiny-web-linux-arm-6 - asset_content_type: application/octet-stream - - name: Release Asset - Collector - linux-arm-6 - id: upload-release-asset8 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-collector-metrics-linux-arm-6 - asset_name: scrutiny-collector-metrics-linux-arm-6 - asset_content_type: application/octet-stream +# - name: Release Asset - Web - linux-arm64 +# id: upload-release-asset3 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-web-linux-arm64 +# asset_name: scrutiny-web-linux-arm64 +# asset_content_type: application/octet-stream +# - name: Release Asset - Collector - linux-arm64 +# id: upload-release-asset4 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-collector-metrics-linux-arm64 +# asset_name: scrutiny-collector-metrics-linux-arm64 +# asset_content_type: application/octet-stream - - name: Release Asset - Web - linux-arm-7 - id: upload-release-asset9 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-web-linux-arm-7 - asset_name: scrutiny-web-linux-arm-7 - asset_content_type: application/octet-stream - - name: Release Asset - Collector - linux-arm-7 - id: upload-release-asset10 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-collector-metrics-linux-arm-7 - asset_name: scrutiny-collector-metrics-linux-arm-7 - asset_content_type: application/octet-stream +# - name: Release Asset - Web - linux-arm-5 +# id: upload-release-asset5 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-web-linux-arm-5 +# asset_name: scrutiny-web-linux-arm-5 +# asset_content_type: application/octet-stream +# - name: Release Asset - Collector - linux-arm-5 +# id: upload-release-asset6 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-collector-metrics-linux-arm-5 +# asset_name: scrutiny-collector-metrics-linux-arm-5 +# asset_content_type: application/octet-stream -# - name: Release Asset - Web - freebsd-amd64 +# - name: Release Asset - Web - linux-arm-6 # id: upload-release-asset7 # uses: actions/upload-release-asset@v1 # env: # GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: ${{ env.PROJECT_PATH }}/scrutiny-web-freebsd-amd64 -# asset_name: scrutiny-web-freebsd-amd64 +# asset_path: /build/scrutiny-web-linux-arm-6 +# asset_name: scrutiny-web-linux-arm-6 # asset_content_type: application/octet-stream -# - name: Release Asset - Collector - freebsd-amd64 +# - name: Release Asset - Collector - linux-arm-6 # id: upload-release-asset8 # uses: actions/upload-release-asset@v1 # env: # GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: ${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-freebsd-amd64 -# asset_name: scrutiny-collector-metrics-freebsd-amd64 +# asset_path: /build/scrutiny-collector-metrics-linux-arm-6 +# asset_name: scrutiny-collector-metrics-linux-arm-6 +# asset_content_type: application/octet-stream + +# - name: Release Asset - Web - linux-arm-7 +# id: upload-release-asset9 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-web-linux-arm-7 +# asset_name: scrutiny-web-linux-arm-7 +# asset_content_type: application/octet-stream +# - name: Release Asset - Collector - linux-arm-7 +# id: upload-release-asset10 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_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: /build/scrutiny-collector-metrics-linux-arm-7 +# asset_name: scrutiny-collector-metrics-linux-arm-7 # asset_content_type: application/octet-stream