Skip to content

Release Nightly

Release Nightly #871

name: Release Nightly
on:
schedule:
- cron: "0 6 * * *"
repository_dispatch:
workflow_dispatch:
jobs:
checksecret:
name: check if VSCODE_MARKETPLACE_TOKEN is set in github secrets
runs-on: ubuntu-latest
outputs:
is_MY_SECRET_set: ${{ steps.checksecret_job.outputs.is_MY_SECRET_set }}
steps:
- name: Check secret present
id: checksecret_job
env:
MY_SECRET: ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}
run: |
echo "is_MY_SECRET_set: ${{ env.MY_SECRET != '' }}"
echo "::set-output name=is_MY_SECRET_set::${{ env.MY_SECRET != '' }}"
build:
## Do not run this action without the marketplace token present,
## e.g., in a fork of this repo.
needs: [checksecret]
if: needs.checksecret.outputs.is_MY_SECRET_set == 'true'
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '14.17'
- name: Get (nightly) TLC
run: wget https://nightly.tlapl.us/dist/tla2tools.jar -O tools/tla2tools.jar
- name: Get (nightly) CommunityModules
run: wget https://github.com/tlaplus/CommunityModules/releases/latest/download/CommunityModules-deps.jar -O tools/CommunityModules-deps.jar
- name: Prepare nightly
run: |
git add tools/*.jar -f
git commit -m "Snapshot latest CommunityModules and TLA+ tools"
.github/workflows/nightly.sh
git diff package.json
- name: Get current version
id: version
run: echo "::set-output name=version::$(jq -r .version package.json)"
- name: Install dependencies
run: |
npm install
npm install -g vsce
- name: Build
run: |
npm run vscode:prepublish
vsce package
- name: Check
run: |
npm run lint
npm test --silent
- name: Publish to Marketplace
run: vsce publish --pat "${{ secrets.VSCODE_MARKETPLACE_TOKEN }}"
## Continue publishing to the ovsx marketplace even if publication to the VSCode marketplace fails.
continue-on-error: true
- name: Publish to Open VSX
run: npx ovsx publish "vscode-tlaplus-nightly-${{ steps.version.outputs.version }}.vsix" -p "${{ secrets.OPEN_VSX_TOKEN }}"