Skip to content

Commit

Permalink
Fix OPAM package publication
Browse files Browse the repository at this point in the history
  • Loading branch information
maximedenes committed Aug 19, 2023
1 parent ca3fce6 commit 804027d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,23 @@ jobs:
- 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_SLUG#v}"
VERSION="${GITHUB_REF#v}"
VERSION_SLUG="${GITHUB_REF_NAME_SLUG#v}"
VERSION="${GITHUB_REF_NAME#v}"
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/$GITHUB_REF/vscoq-language-server-$VERSION_SLUG.tar.gz vscoq-language-server.opam
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
- name: Create language-server archive
run: |
cd language-server
VERSION="${GITHUB_REF_SLUG#v}"
VERSION="${GITHUB_REF_NAME_SLUG#v}"
git archive -o ../vscoq-language-server-$VERSION.tar.gz --prefix=vscoq-language-server-$VERSION/ $GITHUB_SHA .
- name: Release
Expand Down

0 comments on commit 804027d

Please sign in to comment.