0.2.3 #14
Workflow file for this run
This file contains hidden or 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: Build client | |
| on: | |
| release: | |
| types: [created] | |
| jobs: | |
| test_and_build: | |
| name: Build and publish client | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: oven-sh/setup-bun@v1 | |
| - name: Install dependencies | |
| run: bun i | |
| - name: Run tests | |
| run: bun test | |
| - name: Run build | |
| run: bun run build | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| - name: Set tag | |
| id: tag | |
| run: | | |
| if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then | |
| echo "tag=dev" >> $GITHUB_OUTPUT | |
| elif [[ "${{ github.event.release.prerelease }}" == "false" ]]; then | |
| echo "tag=latest" >> $GITHUB_OUTPUT | |
| fi | |
| - uses: JS-DevTools/npm-publish@v3 | |
| with: | |
| token: ${{ secrets.NPM_TOKEN }} | |
| package: ./out/package.json | |
| tag: ${{ steps.tag.outputs.tag }} |