Create Release #956
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 | |
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@343f7c4344506bcbf9b4de18042ae17996df046d | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
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@866beb009af3db457e82ca98efe474969a5ebce8 | |
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 |