diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7a551445d..6d576f634 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -37,22 +37,7 @@ jobs: mkdir -p ~/.opam/plugins/opam-publish printf "$OPAM_PUBLISH_TOKEN" > ~/.opam/plugins/opam-publish/vscoqbot.token - - name: Create archive - run: | - VERSION_SLUG="${GITHUB_REF_NAME_SLUG#v}" - VERSION="${GITHUB_REF_NAME#v}" - cd language-server - git archive -o vscoq-language-server-$VERSION.tar.gz --prefix=vscoq-language-server-$VERSION/ $VERSION_SLUG . - - - name: Release archive - uses: softprops/action-gh-release@v1 - with: - files: vscoq-language-server-*.tar.gz - fail_on_unmatched_files: true - append_body: true - prerelease: ${{ github.event.release.prerelease }} - - - name: Publish release + - name: Publish release on opam if: ${{ !github.event.release.prerelease }} run: | eval $(opam env) @@ -63,7 +48,7 @@ jobs: git config --global user.email vscoqbot@inria.fr opam publish --no-confirmation --no-browser -v $VERSION https://github.com/coq/vscoq/releases/download/$GITHUB_REF_NAME/vscoq-language-server-$VERSION_SLUG.tar.gz vscoq-language-server.opam - - name: Publish prerelease + - name: Publish prerelease on coq/opam if: ${{ github.event.release.prerelease }} run: | eval $(opam env) diff --git a/.github/workflows/publish-server.yml b/.github/workflows/publish-server.yml index f556008d9..6fcf11f5a 100644 --- a/.github/workflows/publish-server.yml +++ b/.github/workflows/publish-server.yml @@ -4,7 +4,6 @@ on: tag: description: 'Tag to use for release' required: true - default: ${GITHUB_REF_NAME#v} prerelease: description: 'Is this a pre-release' required: true @@ -44,22 +43,7 @@ jobs: mkdir -p ~/.opam/plugins/opam-publish printf "$OPAM_PUBLISH_TOKEN" > ~/.opam/plugins/opam-publish/vscoqbot.token - - name: Create archive - run: | - VERSION_SLUG="${{ github.event.inputs.tag }}" - VERSION="${VERSION_SLUG#v}" - cd language-server - git archive -o vscoq-language-server-$VERSION.tar.gz --prefix=vscoq-language-server-$VERSION/ $VERSION_SLUG . - - - name: Release archive - uses: softprops/action-gh-release@v1 - with: - files: vscoq-language-server-*.tar.gz - fail_on_unmatched_files: true - prerelease: ${{ github.event.inputs.prerelease }} - append_body: true - - - name: Publish release + - name: Publish release on opam if: ${{ !github.event.inputs.prerelease }} run: | eval $(opam env) @@ -70,7 +54,7 @@ jobs: git config --global user.email vscoqbot@inria.fr opam publish --no-confirmation --no-browser -v $VERSION https://github.com/coq/vscoq/releases/download/$VERSION_SLUG/vscoq-language-server-$VERSION.tar.gz vscoq-language-server.opam - - name: Publish prerelease + - name: Publish prerelease on coq/opam if: ${{ github.event.inputs.prerelease }} run: | eval $(opam env) diff --git a/docs/developers.md b/docs/developers.md index 6ac3642e5..55cd5713e 100644 --- a/docs/developers.md +++ b/docs/developers.md @@ -131,7 +131,21 @@ To release a new version of VsCoq: git push origin #VERSION_NUMBER ``` -Version semantics are currently as follows: v#NUMBER+coq#COQ_VERSION (ex: v1.9.2+coq.8.18) +~~Version semantics are currently as follows: v#NUMBER+coq#COQ_VERSION (ex: v1.9.2+coq.8.18)~~ +Since we now use opt comp and support all coq versions, version semantics are v2.#.# (ex: v2.2.2) Once the CI has run, a draft release will be automatically created. Open the draft release and edit the change log to your liking. Finally, light a candle, do a little prayer and click release ! + +After the opam package has been published (PR merged by opam maintainers), the user should then use ```publish-extension.yml``` to publish the extensions on the vscode marketplace as well as vscodium. + +# CI/CD pipeline for release process + +The CI pipeline (```ci.yml```) handles creating the draft release (with a tarball archive) when a tag is pushed. This is done in the ```create-release``` job. + +The CD pipeline (```cd.yml```) automatically publishes the release to opam once the draft is released. Don't forget to fill out the change log +appropriately before hitting release. If it is a pre-release, the pipeline will publish to ```coq/opam``` instead of ```opam/opam-repository```. + +There are two manual pipelines: +- ```publish-server.yml``` allows to publish a release on opam manually (if the automatic pipeline goes wrong). The user only need to give the tag (with the correct version semantics) and specify if it is a release or pre-release. +- ```publish-extension.yml``` handles publishing the extension on the vscode market place as well as vscodium. **This is always done manually because the opam release process might take some time. The extensions should only be published once the package is on opam.** \ No newline at end of file