Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/release-publish-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,20 @@ jobs:
name: Publish Draft Release
runs-on: ubuntu-latest
steps:
# An App token, not GITHUB_TOKEN: releases published with GITHUB_TOKEN
# don't trigger release.yml.
- name: create GitHub App token
id: app-token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
client-id: ${{ secrets.RELEASE_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_APP_PEM }}
owner: springload
repositories: aws-ssh
permission-contents: write
- name: Publish current draft release, if any
env:
GH_TOKEN: ${{ secrets.CICD_TOKEN }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GH_REPO: ${{ github.repository }}
run: |
set -euo pipefail
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
release:
types: [published]

permissions:
contents: write

jobs:
build_and_publish:
name: build and publish aws-ssh
Expand All @@ -16,10 +19,20 @@ jobs:
uses: actions/setup-go@v7
with:
go-version: 1.27.x
- name: create GitHub App token
id: app-token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
client-id: ${{ secrets.RELEASE_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_APP_PEM }}
owner: springload
repositories: homebrew-tools
permission-contents: write
- name: run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ brews:
repository:
owner: springload
name: homebrew-tools
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
directory: Formula