Skip to content

GitHub Release

GitHub Release #30

Workflow file for this run

name: GitHub Release
on:
workflow_dispatch:
env:
python-version: "3.10"
jobs:
# News file based version calculation
create-release:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: tibdex/github-app-token@v2
id: get_installation_token
with:
app_id: 1020175
private_key: ${{ secrets.OTG_PLT_DEVECO_APP_PRVT_KEY }}
# Checkout with full history so commit number can be calculated for beta versions
- uses: actions/checkout@v4
with:
token: ${{ steps.get_installation_token.outputs.token }}
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
# Towncrier and CI tools are written in Python
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Install CI tools
run: pip install continuous-delivery-scripts
- name: Generate release notes from news files
run: cd-generate-news --release-type release
- name: Determine version number based on news files
run: |
echo "SEMVER_VERSION=$(cd-determine-version --release-type release)" >> $GITHUB_ENV
- name: Report version number for run
run: |
echo "::notice:: Releasing $SEMVER_VERSION"
- name: Commit changes
uses: EndBug/add-and-commit@v9.1.4
with:
author_name: otg-platform-armdeveloperecosystem[bot]
author_email: 184357714+otg-platform-armdeveloperecosystem[bot]@users.noreply.github.com
message: "Release v${{ env.SEMVER_VERSION }} [skip ci]"
add: "changes"
tag: "v${{ env.SEMVER_VERSION }} -m 'Release v${{ env.SEMVER_VERSION }}'"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}