Create Release #2580
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release | |
on: | |
schedule: | |
# At minute 30 past every 6th hour. | |
- cron: "30 */6 * * *" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
id-token: write | |
issues: write | |
packages: read | |
# Only allow a single release workflow to run at a time. | |
concurrency: ${{ github.workflow }} | |
jobs: | |
release: | |
environment: production | |
if: github.repository == 'bufbuild/plugins' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository code | |
uses: actions/checkout@v4 | |
- name: Login to GitHub Container Registry | |
if: github.repository == 'bufbuild/plugins' | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
check-latest: true | |
- name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
MINISIGN_PRIVATE_KEY: ${{ secrets.MINISIGN_PRIVATE_KEY }} | |
MINISIGN_PRIVATE_KEY_PASSWORD: ${{ secrets.MINISIGN_PRIVATE_KEY_PASSWORD }} | |
run: | | |
echo "${MINISIGN_PRIVATE_KEY}" > minisign.key | |
go run ./internal/cmd/release -commit ${{ github.sha }} -minisign-private-key minisign.key . | |
- name: Clean Up | |
if: always() | |
run: | | |
rm -fv minisign.key | |
- uses: dblock/create-a-github-issue@c5e54b8762a0c4c2cd9330750e30b81bcc369c38 | |
if: failure() | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
GITHUB_SERVER_URL: ${ github.server_url }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_RUN_ID: ${{ github.run_id }} | |
GITHUB_RUN_ATTEMPT: ${{ github.run_attempt }} | |
with: | |
filename: .github/automatic-workflow-issue-template.md | |
update_existing: true | |
search_existing: open | |
upload: | |
needs: release | |
uses: ./.github/workflows/upload.yml |