Skip to content

Commit 1bf53e5

Browse files
authored
Merge pull request #979 from coq/fix-cd-pipeline
Fix cd pipeline
2 parents ae65f8a + c2a4015 commit 1bf53e5

File tree

3 files changed

+19
-36
lines changed

3 files changed

+19
-36
lines changed

.github/workflows/cd.yml

+2-17
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,7 @@ jobs:
3737
mkdir -p ~/.opam/plugins/opam-publish
3838
printf "$OPAM_PUBLISH_TOKEN" > ~/.opam/plugins/opam-publish/vscoqbot.token
3939
40-
- name: Create archive
41-
run: |
42-
VERSION_SLUG="${GITHUB_REF_NAME_SLUG#v}"
43-
VERSION="${GITHUB_REF_NAME#v}"
44-
cd language-server
45-
git archive -o vscoq-language-server-$VERSION.tar.gz --prefix=vscoq-language-server-$VERSION/ $VERSION_SLUG .
46-
47-
- name: Release archive
48-
uses: softprops/action-gh-release@v1
49-
with:
50-
files: vscoq-language-server-*.tar.gz
51-
fail_on_unmatched_files: true
52-
append_body: true
53-
prerelease: ${{ github.event.release.prerelease }}
54-
55-
- name: Publish release
40+
- name: Publish release on opam
5641
if: ${{ !github.event.release.prerelease }}
5742
run: |
5843
eval $(opam env)
@@ -63,7 +48,7 @@ jobs:
6348
git config --global user.email [email protected]
6449
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
6550
66-
- name: Publish prerelease
51+
- name: Publish prerelease on coq/opam
6752
if: ${{ github.event.release.prerelease }}
6853
run: |
6954
eval $(opam env)

.github/workflows/publish-server.yml

+2-18
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
tag:
55
description: 'Tag to use for release'
66
required: true
7-
default: ${GITHUB_REF_NAME#v}
87
prerelease:
98
description: 'Is this a pre-release'
109
required: true
@@ -44,22 +43,7 @@ jobs:
4443
mkdir -p ~/.opam/plugins/opam-publish
4544
printf "$OPAM_PUBLISH_TOKEN" > ~/.opam/plugins/opam-publish/vscoqbot.token
4645
47-
- name: Create archive
48-
run: |
49-
VERSION_SLUG="${{ github.event.inputs.tag }}"
50-
VERSION="${VERSION_SLUG#v}"
51-
cd language-server
52-
git archive -o vscoq-language-server-$VERSION.tar.gz --prefix=vscoq-language-server-$VERSION/ $VERSION_SLUG .
53-
54-
- name: Release archive
55-
uses: softprops/action-gh-release@v1
56-
with:
57-
files: vscoq-language-server-*.tar.gz
58-
fail_on_unmatched_files: true
59-
prerelease: ${{ github.event.inputs.prerelease }}
60-
append_body: true
61-
62-
- name: Publish release
46+
- name: Publish release on opam
6347
if: ${{ !github.event.inputs.prerelease }}
6448
run: |
6549
eval $(opam env)
@@ -70,7 +54,7 @@ jobs:
7054
git config --global user.email [email protected]
7155
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
7256
73-
- name: Publish prerelease
57+
- name: Publish prerelease on coq/opam
7458
if: ${{ github.event.inputs.prerelease }}
7559
run: |
7660
eval $(opam env)

docs/developers.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,21 @@ To release a new version of VsCoq:
131131
git push origin #VERSION_NUMBER
132132
```
133133

134-
Version semantics are currently as follows: v#NUMBER+coq#COQ_VERSION (ex: v1.9.2+coq.8.18)
134+
~~Version semantics are currently as follows: v#NUMBER+coq#COQ_VERSION (ex: v1.9.2+coq.8.18)~~
135+
Since we now use opt comp and support all coq versions, version semantics are v2.#.# (ex: v2.2.2)
135136

136137
Once the CI has run, a draft release will be automatically created. Open the draft release and edit the change log to your liking.
137138
Finally, light a candle, do a little prayer and click release !
139+
140+
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.
141+
142+
# CI/CD pipeline for release process
143+
144+
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.
145+
146+
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
147+
appropriately before hitting release. If it is a pre-release, the pipeline will publish to ```coq/opam``` instead of ```opam/opam-repository```.
148+
149+
There are two manual pipelines:
150+
- ```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.
151+
- ```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.**

0 commit comments

Comments
 (0)