Executing release on UK-Export-Finance/mdm-api π #627
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
# MDM Git Hub Actions | |
##################################### | |
# This GHA is responsible for creating automated | |
# GitHub release based PRs. Once the PR is merged, | |
# Google Release Please will update the `CHANGELOG.md`, | |
# `README.md` and `package.json` files, followed by | |
# tagging the commit with the appropriate version | |
# number (as per SemVer) and creating a GitHub tag for the release. | |
name: Automated release | |
run-name: Executing release on ${{ github.repository }} π | |
on: | |
push: | |
branches: [main] | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
# 1. Setup test infrastructure | |
setup: | |
name: Infrastructure setup π§ | |
runs-on: ubuntu-latest | |
outputs: | |
environment: ${{ env.environment }} | |
timezone: ${{ env.timezone }} | |
steps: | |
- name: Environment π§ͺ | |
run: echo "Environment set to ${{ env.environment }}" | |
- name: Timezone π | |
run: echo "Timezone set to ${{ env.timezone }}" | |
# 2. Update files | |
release: | |
name: Release β¨ | |
needs: setup | |
environment: | |
name: ${{ needs.setup.outputs.environment }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Repository | |
uses: actions/checkout@v4 | |
- name: Dependencies | |
working-directory: ./ | |
run: npm ci | |
- name: Create | |
working-directory: ./ | |
run: npx release-please release-pr --token=${{ secrets.RELEASE_TOKEN }} --repo-url=https://github.com/${{ github.repository }} --release-type=node |