diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml deleted file mode 100644 index 0e8e653b..00000000 --- a/.github/workflows/create-release-pr.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: "Create Release PR" -on: - workflow_dispatch: - inputs: - release_version: - description: "next release version" - required: true -env: - GIT_AUTHOR_NAME: mackerelbot - GIT_AUTHOR_EMAIL: mackerelbot@users.noreply.github.com - GIT_COMMITTER_NAME: mackerelbot - GIT_COMMITTER_EMAIL: mackerelbot@users.noreply.github.com - -jobs: - create: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - uses: shogo82148/actions-setup-perl@v1 - with: - perl-version: "5.34" - - - uses: mackerelio/mackerel-create-release-pull-request-action@main - id: start - with: - github_token: ${{ secrets.MACKERELBOT_GITHUB_TOKEN }} - next_version: ${{ github.event.inputs.release_version }} - package_name: mackerel-check-plugins - version_go_file_path: mackerel-check.go - - - run: | - CURRENT=${{ steps.start.outputs.currentVersion }} - NEXT=${{ steps.start.outputs.nextVersion }} - mv packaging/mackerel-check-plugins_$CURRENT.orig.tar.gz packaging/mackerel-check-plugins_$NEXT.orig.tar.gz - - - uses: mackerelio/mackerel-create-release-pull-request-action@main - with: - github_token: ${{ secrets.MACKERELBOT_GITHUB_TOKEN }} - finished: "true" - package_name: mackerel-check-plugins - next_version: ${{ steps.start.outputs.nextVersion }} - branch_name: ${{ steps.start.outputs.branchName }} - pull_request_infos: ${{ steps.start.outputs.pullRequestInfos }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..73c5d1b7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Sensu Release + +on: + push: + tags: + - '*' + +jobs: + + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + - name: Build Go check plugins + run: make build + - name: Rename build directory + run: mv build bin + - name: Create tar archive of build directory + run: tar -czpvf sensu-go-check-plugins.tar.gz bin/ + - name: Generate SHA512 sum of archive + run: sha512sum sensu-go-check-plugins.tar.gz > sha512sum.txt + - uses: ncipollo/release-action@v1 + with: + artifacts: "sensu-go-check-plugins.tar.gz,sha512sum.txt"