Skip to content

Release vv1.1.22

Release vv1.1.22 #1

name: Release Perform
on:
workflow_dispatch:
pull_request:
types: [closed]
env:
VERSION: ${{ github.event.inputs.version }}
# TODO: use the acutal ID
APP_ID: 417207
jobs:
perform:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release') }}
steps:
- uses: actions/create-github-app-token@v1.5.1
id: app-token
with:
app-id: ${{ env.APP_ID }}
private-key: ${{ secrets.TOKEN_EXCHANGE_GH_APP_PRIVATE_KEY }}
- name: Set VERSION variable from tag
run: |
VERSION=${{github.head_ref}}
echo "VERSION=${VERSION##*/}" >> $GITHUB_ENV
- name: Checkout repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
# skip generating assets, which potentially requires setup-go
- name: Fetch Changelog
run: .github/actions/changelog-action/entrypoint.sh > ${{env.VERSION}}-CHANGELOG.md
# todo: remove this
- run: .github/actions/changelog-action/entrypoint.sh
# todo: remove this
- run: cat ./random.txt
# todo: remove this
- run: echo "hello"
# todo: remove this
- run: cat ${{env.VERSION}}-CHANGELOG.md
# todo: revert release files back to the assets
- run: gh release create --draft --notes-file ${{env.VERSION}}-CHANGELOG.md ${{env.VERSION}} ./random.txt
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
# placeholder for slack notification