Merge branch 'main' of https://github.com/loveakinlesi/react-dynamic-… #10
Workflow file for this run
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: Test, Build, and Release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build-test-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Install pnpm | |
run: | | |
corepack enable | |
corepack prepare pnpm@latest --activate | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run tests | |
run: pnpm test | |
- name: Build project | |
run: pnpm run prepublish | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/** | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to npm | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: pnpm publish --access public |