chore: github workflow #8
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
name: Release | ||
on: | ||
push: | ||
branches: | ||
- release | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.12.0 | ||
- name: Install deps | ||
run: pnpm install | ||
- name: Run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config user.name "ajiu9" | ||
git config user.email "[email protected]" | ||
pnpm run release | ||
merge-to-main: | ||
needs: release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Merge release to main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config user.name "ajiu9" | ||
git config user.email "[email protected]" | ||
git checkout main | ||
git merge release --no-ff -m "Merge release into main" | ||
git push origin main |