Publish #340
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
# Taken from roblox-ts under the MIT license https://github.com/roblox-ts/roblox-ts/blob/master/.github/workflows/publish.yml | |
name: Publish | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 7 * * *" | |
jobs: | |
publish: | |
if: github.repository == 'Dionysusnu/rbxts-rust-classes' && github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install Foreman dependencies | |
uses: rojo-rbx/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install NPM dependencies | |
uses: bahmutov/[email protected] | |
- name: Publish | |
continue-on-error: true | |
shell: bash | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
echo $(cat package.json | jq ".version |= . + \"-dev-$(git rev-parse --short HEAD)\"") > package.json | |
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc | |
npm publish --tag next | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |