Skip to content

Commit

Permalink
Merge "alygin.vscode-tlaplus" and "alygin.vscode-tlaplus-nightly" on …
Browse files Browse the repository at this point in the history
…Marketplace.

Part of Github issue #318
#318

[Build]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
  • Loading branch information
lemmy committed Aug 15, 2024
1 parent d2e1743 commit d26855a
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 152 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/nightly.sh

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/pre-release.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/release-nightly.yml

This file was deleted.

42 changes: 37 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,49 @@
name: Release

on: workflow_dispatch
on:
schedule:
- cron: "0 6 * * *"
repository_dispatch:
workflow_dispatch:

jobs:
checksecret:
name: check if VSCODE_MARKETPLACE_TLAPLUS_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_TLAPLUS_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: '18.19'
- name: Get (latest) TLC
run: wget https://nightly.tlapl.us/dist/tla2tools.jar -O tools/tla2tools.jar
- name: Get (latest) CommunityModules
run: wget https://github.com/tlaplus/CommunityModules/releases/latest/download/CommunityModules-deps.jar -O tools/CommunityModules-deps.jar
- name: Prepare Release
run: |
## Create a git commit to use its date as the extension's version number below.
git add tools/*.jar -f
git commit -m "Latest CommunityModules and TLA+ tools"
- name: Get current version
id: version
run: echo "::set-output name=version::$(jq -r .version package.json)"
run: echo "::set-output name=version::$(git log -1 --format=%cd --date="format:%Y.%-m.%-d%H%M")"
- name: Install dependencies
run: |
npm install
Expand All @@ -26,9 +57,9 @@ jobs:
npm run lint
npm test --silent
- name: Publish to Marketplace
run: vsce publish --pat "${{ secrets.VSCODE_MARKETPLACE_TOKEN }}"
- name: Publish to Open VSX
run: npx ovsx publish "vscode-tlaplus-${{ steps.version.outputs.version }}.vsix" -p "${{ secrets.OPEN_VSX_TOKEN }}"
run: vsce publish $(git log -1 --format=%cd --date="format:%Y.%-m.%-d%H%M") --pat "${{ secrets.VSCODE_MARKETPLACE_TLAPLUS_TOKEN }}"
## Continue publishing in the following steps even if publication to the VSCode marketplace fails.
continue-on-error: true
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -49,3 +80,4 @@ jobs:
asset_path: vscode-tlaplus-${{ steps.version.outputs.version }}.vsix
asset_name: vscode-tlaplus-${{ steps.version.outputs.version }}.vsix
asset_content_type: application/zip

2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
MIT License

Copyright (c) 2019 Andrew Lygin
Copyright (c) 2020 TLA+ Foundation


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "vscode-tlaplus",
"displayName": "TLA+",
"version": "1.6.0",
"version": "1.7.0",
"description": "TLA+ language support",
"publisher": "alygin",
"publisher": "tlaplus-lang",
"license": "MIT",
"author": {
"name": "Andrew Lygin"
"name": "TLA+ Community"
},
"engines": {
"vscode": "^1.82.0"
Expand All @@ -20,10 +20,10 @@
],
"repository": {
"type": "git",
"url": "https://github.com/alygin/vscode-tlaplus.git"
"url": "https://github.com/tlaplus/vscode-tlaplus.git"
},
"bugs": {
"url": "https://github.com/alygin/vscode-tlaplus/issues"
"url": "https://github.com/tlaplus/vscode-tlaplus/issues"
},
"icon": "resources/images/tlaplus.png",
"keywords": [
Expand Down Expand Up @@ -334,7 +334,7 @@
"type": "string",
"scope": "window",
"default": "",
"markdownDescription": "Java options to use when running TLA+ tools. [How it works.](https://github.com/alygin/vscode-tlaplus/wiki/Java-Options)",
"markdownDescription": "Java options to use when running TLA+ tools. [How it works.](https://github.com/tlaplus/vscode-tlaplus/wiki/Java-Options)",
"maxLength": 1000
},
"tlaplus.pluscal.options": {
Expand Down

0 comments on commit d26855a

Please sign in to comment.