Skip to content

Merge pull request #11 from motionhungry/fix/release-config #9

Merge pull request #11 from motionhungry/fix/release-config

Merge pull request #11 from motionhungry/fix/release-config #9

Workflow file for this run

name: 'ci:release'
on:
push:
branches:
- main
- next
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install dependencies with pnpm
uses: motionhungry/github-actions/install-pnpm@v1
- name: Build
run: pnpm build
- name: Publish to NPM
run: pnpm semantic-release
env:
GITHUB_TOKEN: ${{ secrets.CI_ACCESS_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_AUTHOR_NAME: ${{ vars.GIT_COMMITTER_NAME }}
GIT_AUTHOR_EMAIL: ${{ vars.GIT_COMMITTER_EMAIL }}
GIT_COMMITTER_NAME: ${{ vars.GIT_COMMITTER_NAME }}
GIT_COMMITTER_EMAIL: ${{ vars.GIT_COMMITTER_EMAIL }}
update-next:
if: ${{ github.ref == 'refs/heads/main' }}
needs: [release]
name: Update next
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: 'next'
token: ${{ secrets.CI_ACCESS_TOKEN }}
- name: Back-merge main into next
run: |
git merge --ff-only origin/main
git push