Merge pull request #19 from ineka-dev/refactor/engine-loop #64
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: | |
- main | |
jobs: | |
build: | |
name: Build and test project before release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: dist | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
path: dist | |
- name: Create Release Pull Request or Publish to npm | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm release:publish | |
version: pnpm release:version | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |