2.0.0-alpha.9 #7
Workflow file for this run
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 Prerelease | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
name: Publish | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install Titanium CLI | |
run: npm i -g titanium | |
- name: Cache Titanium SDK | |
id: titanium-cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.titanium/mobilesdk/linux/${{ env.SDK_VERSION }} | |
key: ${{ runner.os }}-titanium-sdk-${{ env.SDK_VERSION }} | |
restore-keys: | | |
${{ runner.os }}-titanium-sdk- | |
- name: Install dependencies | |
run: yarn | |
if: steps.node-cache.outputs.cache-hit != 'true' | |
- name: Publish to npm | |
env: | |
GH_TOKEN: ${{ github.token }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
RELEASE_TAG: ${{ github.event.release.prerelease && 'next' || 'latest' }} | |
run: npm publish --tag $RELEASE_TAG |