Skip to content

Fix marketplace, open-vsx & OPAM publication #13

Fix marketplace, open-vsx & OPAM publication

Fix marketplace, open-vsx & OPAM publication #13

Workflow file for this run

on:
release:
types:
- published
pull_request:
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
- name: Write PAT
env:
OPAM_PUBLISH_TOKEN: ${{ secrets.OPAM_PUBLISH_TOKEN }}
run: printf "$OPAM_PUBLISH_TOKEN" > ~/.opam/plugins/opam-publish/maximedenes.token
#VERSION_SLUG="${GITHUB_REF_NAME_SLUG#v}"
#VERSION="${GITHUB_REF_NAME#v}"
#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.tar.gz vscoq-language-server.opam
- name: Publish
run: |
eval $(opam env)
echo $GITHUB_REF_NAME_SLUG
VERSION_SLUG=1.9.1-coq8.18
VERSION=1.9.1+coq8.18
cd language-server
opam publish --no-browser --repo=coq/opam-coq-archive --packages-directory=extra-dev/packages -v $VERSION https://github.com/coq-community/vscoq/releases/download/v$VERSION/vscoq-language-server-$VERSION_SLUG.tar.gz vscoq-language-server.opam