v1.9.3+coq8.18 #18
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
on: | |
release: | |
types: | |
- published | |
jobs: | |
publish-extension: | |
runs-on: ubuntu-latest | |
if: success() && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Publish on VsCode marketplace | |
run: | | |
cd client | |
cp ../LICENSE . && cp ../README.md . | |
- name: Publish to Open VSX Registry | |
uses: HaaLeo/publish-vscode-extension@v1 | |
id: publishToOpenVSX | |
with: | |
pat: ${{ secrets.OVSX_PAT }} | |
packagePath: ./client/ | |
yarn: true | |
preRelease: true | |
- name: Publish to Visual Studio Marketplace | |
uses: HaaLeo/publish-vscode-extension@v1 | |
with: | |
pat: ${{ secrets.VSCE_PAT }} | |
packagePath: ./client/ | |
registryUrl: https://marketplace.visualstudio.com | |
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }} | |
yarn: true | |
preRelease: true | |
publish-opam-package: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
ocaml-compiler: [4.14.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use OCaml ${{ matrix.ocaml-compiler }} | |
uses: avsm/setup-ocaml@v2 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
- name: Install opam-publish # 2.0.3 because more recent versions do not respect OPAMYES | |
run: opam install -y -j 2 opam-publish=2.0.3 | |
- name: Inject slug/short variables | |
uses: rlespinasse/github-slug-action@v4 | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.BOT_SSH_KEY }} | |
- name: Write PAT | |
env: | |
OPAM_PUBLISH_TOKEN: ${{ secrets.OPAM_PUBLISH_TOKEN }} | |
run: | | |
mkdir -p ~/.opam/plugins/opam-publish | |
printf "$OPAM_PUBLISH_TOKEN" > ~/.opam/plugins/opam-publish/vscoqbot.token | |
- name: Publish | |
run: | | |
eval $(opam env) | |
VERSION_SLUG="${GITHUB_REF_NAME_SLUG#v}" | |
VERSION="${GITHUB_REF_NAME#v}" | |
cd language-server | |
git config --global user.name vscoqbot | |
git config --global user.email [email protected] | |
opam publish --no-browser --repo=coq/opam-coq-archive --packages-directory=extra-dev/packages -v $VERSION https://github.com/coq-community/vscoq/releases/download/$GITHUB_REF_NAME/vscoq-language-server-$VERSION_SLUG.tar.gz vscoq-language-server.opam |