-
Notifications
You must be signed in to change notification settings - Fork 30
65 lines (62 loc) · 2.22 KB
/
release-nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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 }}"