feat: add cargo example #96
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: Publish Beta | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| workflow_run: | |
| workflows: ['Build'] | |
| types: | |
| - completed | |
| workflow_dispatch: | |
| inputs: | |
| target: | |
| description: 'Publish beta' | |
| required: true | |
| default: 'beta' | |
| type: choice | |
| options: | |
| - beta | |
| jobs: | |
| publish_beta: | |
| name: π Publish Beta to npm | |
| runs-on: ubuntu-latest | |
| if: github.event.inputs.target == 'beta' && github.ref == 'refs/heads/develop' | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: βοΈ Set up Node.js ${{ env.node_version }} | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: ${{ env.node_version }} | |
| - name: π§ Install dependencies | |
| run: npm ci | |
| - name: ποΈ Build | |
| run: npm run build | |
| - name: π Authenticate to npm | |
| run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
| - name: π Publish beta to npm | |
| run: npm publish --tag beta --access=public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |