Skip to content

Release 0.11.0

Release 0.11.0 #2

name: Finish Release Train
on:
pull_request:
types:
- closed
branches:
- main
env:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
concurrency:
group: finish-release-train-${{ github.ref_name }}
cancel-in-progress: true
jobs:
create_pr:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/v')
runs-on: ubuntu-latest
outputs:
version_number: ${{ steps.version_number.outputs.version_number }}
steps:
- uses: actions/checkout@v4
- name: Detect version number
id: version_number
run: |
version_number="$(jq --raw-output '.version' package.json)"
echo "Detected version number: $version_number"
echo "version_number=$version_number" >> $GITHUB_OUTPUT
- name: Create PR
run: |
gh pr create \
--base "development" \
--head "main" \
--title "Finish release ${{ steps.version_number.outputs.version_number }}" \
--body "Finish release ${{ steps.version_number.outputs.version_number }}"
env:
GH_TOKEN: ${{ github.token }}
publish_release:
needs: [create_pr]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Git User
run: |
# setup git
git config --global user.name "Bitmovin Release Automation"
git config --global user.email "[email protected]"
- name: Add tag
run: |
git tag v${{ needs.create_pr.outputs.version_number }}
- name: Git push
run: |
git push origin v${{ needs.create_pr.outputs.version_number }}
- name: Setup node and npm registry
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build TypeScript files
run: yarn build
- name: Publish npm package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Extract changelog
id: changelog
uses: ffurrer2/extract-release-notes@v1
- name: Create GitHub release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ steps.changelog.outputs.release_notes }}