Skip to content

Commit 79196b0

Browse files
committed
Merge "alygin.vscode-tlaplus" and "alygin.vscode-tlaplus-nightly" on Marketplace.
Part of Github issue #318 #318 [Build] Signed-off-by: Markus Alexander Kuppe <[email protected]>
1 parent d2e1743 commit 79196b0

File tree

7 files changed

+50
-154
lines changed

7 files changed

+50
-154
lines changed

.github/workflows/nightly.sh

-23
This file was deleted.

.github/workflows/pre-release.yml

-53
This file was deleted.

.github/workflows/release-nightly.yml

-65
This file was deleted.

.github/workflows/release.yml

+40-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,49 @@
11
name: Release
22

3-
on: workflow_dispatch
3+
on:
4+
schedule:
5+
- cron: "0 6 * * *"
6+
repository_dispatch:
7+
workflow_dispatch:
48

59
jobs:
10+
checksecret:
11+
name: check if VSCODE_MARKETPLACE_TLAPLUS_TOKEN is set in github secrets
12+
runs-on: ubuntu-latest
13+
outputs:
14+
is_MY_SECRET_set: ${{ steps.checksecret_job.outputs.is_MY_SECRET_set }}
15+
steps:
16+
- name: Check secret present
17+
id: checksecret_job
18+
env:
19+
MY_SECRET: ${{ secrets.VSCODE_MARKETPLACE_TLAPLUS_TOKEN }}
20+
run: |
21+
echo "is_MY_SECRET_set: ${{ env.MY_SECRET != '' }}"
22+
echo "::set-output name=is_MY_SECRET_set::${{ env.MY_SECRET != '' }}"
23+
624
build:
25+
## Do not run this action without the marketplace token present,
26+
## e.g., in a fork of this repo.
27+
needs: [checksecret]
28+
if: needs.checksecret.outputs.is_MY_SECRET_set == 'true'
729
runs-on: macOS-latest
830
steps:
931
- uses: actions/checkout@v1
1032
- uses: actions/setup-node@v1
1133
with:
1234
node-version: '18.19'
35+
- name: Get (latest) TLC
36+
run: wget https://nightly.tlapl.us/dist/tla2tools.jar -O tools/tla2tools.jar
37+
- name: Get (latest) CommunityModules
38+
run: wget https://github.com/tlaplus/CommunityModules/releases/latest/download/CommunityModules-deps.jar -O tools/CommunityModules-deps.jar
39+
- name: Prepare Release
40+
run: |
41+
## Create a git commit to use its date as the extension's version number below.
42+
git add tools/*.jar -f
43+
git commit -m "Latest CommunityModules and TLA+ tools"
1344
- name: Get current version
1445
id: version
15-
run: echo "::set-output name=version::$(jq -r .version package.json)"
46+
run: echo "::set-output name=version::$(git log -1 --format=%cd --date="format:%Y.%-m.%-d%H%M")"
1647
- name: Install dependencies
1748
run: |
1849
npm install
@@ -26,9 +57,12 @@ jobs:
2657
npm run lint
2758
npm test --silent
2859
- name: Publish to Marketplace
29-
run: vsce publish --pat "${{ secrets.VSCODE_MARKETPLACE_TOKEN }}"
30-
- name: Publish to Open VSX
31-
run: npx ovsx publish "vscode-tlaplus-${{ steps.version.outputs.version }}.vsix" -p "${{ secrets.OPEN_VSX_TOKEN }}"
60+
run: |
61+
git diff
62+
git status
63+
vsce publish $(git log -1 --format=%cd --date="format:%Y.%-m.%-d%H%M") --pat "${{ secrets.VSCODE_MARKETPLACE_TLAPLUS_TOKEN }}"
64+
## Continue publishing in the following steps even if publication to the VSCode marketplace fails.
65+
continue-on-error: true
3266
- name: Create Release
3367
id: create_release
3468
uses: actions/create-release@v1
@@ -49,3 +83,4 @@ jobs:
4983
asset_path: vscode-tlaplus-${{ steps.version.outputs.version }}.vsix
5084
asset_name: vscode-tlaplus-${{ steps.version.outputs.version }}.vsix
5185
asset_content_type: application/zip
86+

LICENSE

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
MIT License
22

33
Copyright (c) 2019 Andrew Lygin
4+
Copyright (c) 2020 TLA+ Foundation
5+
46

57
Permission is hereby granted, free of charge, to any person obtaining a copy
68
of this software and associated documentation files (the "Software"), to deal

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "vscode-tlaplus",
33
"displayName": "TLA+",
4-
"version": "1.6.0",
4+
"version": "1.7.0",
55
"description": "TLA+ language support",
6-
"publisher": "alygin",
6+
"publisher": "tlaplus-lang",
77
"license": "MIT",
88
"author": {
9-
"name": "Andrew Lygin"
9+
"name": "TLA+ Community"
1010
},
1111
"engines": {
1212
"vscode": "^1.82.0"
@@ -20,10 +20,10 @@
2020
],
2121
"repository": {
2222
"type": "git",
23-
"url": "https://github.com/alygin/vscode-tlaplus.git"
23+
"url": "https://github.com/tlaplus/vscode-tlaplus.git"
2424
},
2525
"bugs": {
26-
"url": "https://github.com/alygin/vscode-tlaplus/issues"
26+
"url": "https://github.com/tlaplus/vscode-tlaplus/issues"
2727
},
2828
"icon": "resources/images/tlaplus.png",
2929
"keywords": [
@@ -334,7 +334,7 @@
334334
"type": "string",
335335
"scope": "window",
336336
"default": "",
337-
"markdownDescription": "Java options to use when running TLA+ tools. [How it works.](https://github.com/alygin/vscode-tlaplus/wiki/Java-Options)",
337+
"markdownDescription": "Java options to use when running TLA+ tools. [How it works.](https://github.com/tlaplus/vscode-tlaplus/wiki/Java-Options)",
338338
"maxLength": 1000
339339
},
340340
"tlaplus.pluscal.options": {

0 commit comments

Comments
 (0)