Skip to content

Publish

Publish #328

Workflow file for this run

# 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:
inputs:
skiptest:
type: boolean
description: Skip unit tests
# schedule:
# - cron: "0 7 * * *"
jobs:
publish:
if: github.repository == 'Dionysusnu/rbxts-rust-classes' && github.ref == 'refs/heads/master'
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
- name: Install Roblox Studio
if: github.event.inputs.skiptest != true
uses: OrbitalOwen/roblox-win-installer-action@1.1
with:
cookie: ${{ secrets.ROBLOSECURITY || '_|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items.|_C4D95B1043562D1055F60AAD48C2EF833CED19A4C04639B9558E9D1CCF2AEA1718B65A404D1C553877E9E74F30A3FA55CABE3211B9496B9BBC425C8979334A9FF3C4EDE5EC33DA6A4A7CC0CDEF2FCA493B88D458EEEFC962FB1F729D01C830D98A3D0338400A0D843CDF8EFE6B42406208CA259398C6C207559D56F0429CD9D567FE6E6CCFCE3C4C87CFAC12DF8F5A0EAC7DB5E6F28D2DA7F722123DBBBA26C8339684F947C915758CC619EC51006A615C82AA087D63772D0CC59473AA35802558434770C7A0163B41E9C7E2937F51B0F8A4C0C493411B7CF470604D39B2ADEC460EDD1AB35086FC3B764770B43A8B7E6D6997AB32A0990E548E118090980192BF581C68754D39D2AC11AE2A2D7FDFC7C4CB34902CBD0B19816DC4BB023F0538C69487EAC48BEC3A7DCED3D142BE185BD103F336C24CD89EA2C3F4D3BBF8F672C922997B1CB503A2860C8F659C1661B517D1C9D7' }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Foreman
if: github.event.inputs.skiptest != true
uses: rojo-rbx/setup-foreman@v1.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install NPM dependencies
if: github.event.inputs.skiptest != true
uses: bahmutov/npm-install@v1.7.4
- name: Run tests
if: github.event.inputs.skiptest != true
run: npm test
- name: Publish
continue-on-error: true
shell: bash
run: |
git config user.name "GitHub Actions"
git config user.email "noreply@github.com"
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 }}