Publish Packages to Github #33
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: Publish Packages to Github | |
on: | |
#release: | |
# types: [created] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Enable Corepack | |
run: corepack enable | |
- run: yarn install --immutable | |
- run: yarn build | |
- run: yarn client test | |
publish-gpr: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
YARN_NPM_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
registry-url: https://npm.pkg.github.com/ | |
- name: Enable Corepack | |
run: corepack enable | |
- run: yarn install --immutable | |
- run: yarn build | |
- run: yarn config set npmPublishRegistry https://npm.pkg.github.com/ | |
- name: Publish ocelloids client (dev) | |
run: yarn workspace @sodazone/ocelloids-client npm publish --tolerate-republish --tag dev |