Skip to content

Release

Release #297

Workflow file for this run

---
name: Release
on:
workflow_dispatch:
pull_request_target:
types: [closed]
branches: [main]
permissions:
contents: read
jobs:
release:
permissions:
contents: write
pull-requests: read
uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release.yaml@3b691dff6b68489c8548e1295d125c93c9c29a4e
with:
publish: true
release-config-name: release-drafter.yml
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
release_image:
needs: release
permissions:
contents: read
packages: write
id-token: write
attestations: write
uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release-image.yaml@3b691dff6b68489c8548e1295d125c93c9c29a4e
with:
image-name: ${{ github.repository_owner }}/stale_repos
full-tag: ${{ needs.release.outputs.full-tag }}
short-tag: ${{ needs.release.outputs.short-tag }}
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-registry: ghcr.io
image-registry-username: ${{ github.actor }}
image-registry-password: ${{ secrets.GITHUB_TOKEN }}
update_major_tag:
needs: release
if: ${{ needs.release.outputs.full-tag != '' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: Checkout Repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-tags: true
ref: ${{ needs.release.outputs.full-tag }}
persist-credentials: true
- name: Force update major tag
run: |
git tag -f "${SHORT}" "${FULL}"
git push -f origin "${SHORT}"
env:
SHORT: ${{ needs.release.outputs.short-tag }}
FULL: ${{ needs.release.outputs.full-tag }}
release_discussion:
needs: release
permissions:
contents: read
discussions: write
uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release-discussion.yaml@3b691dff6b68489c8548e1295d125c93c9c29a4e
with:
full-tag: ${{ needs.release.outputs.full-tag }}
body: ${{ needs.release.outputs.body }}
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
discussion-repository-id: ${{ secrets.RELEASE_DISCUSSION_REPOSITORY_ID }}
discussion-category-id: ${{ secrets.RELEASE_DISCUSSION_CATEGORY_ID }}