Skip to content

Commit b8fa4f2

Browse files
authored
chore: Release uploads artifact + RELEASING.md instructions (#433)
The workflow would need to be tested on the next release
1 parent 62e8f25 commit b8fa4f2

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,27 @@ on:
66
- published
77
workflow_dispatch:
88

9+
permissions:
10+
contents: write
11+
912
jobs:
1013
publish:
1114
runs-on: ubuntu-latest
1215
steps:
1316
- uses: actions/checkout@v3
14-
- name: Publish
17+
- name: Install
18+
run: npm ci
19+
- name: Package
20+
id: package
1521
run: |
16-
npm install
17-
npm run publish
22+
npx vsce package
23+
echo "vsix=$(ls *.vsix)" >> "$GITHUB_OUTPUT"
24+
- name: Publish
25+
run: npx vsce publish --packagePath ${{ steps.package.outputs.vsix }}
1826
env:
1927
VSCE_PAT: ${{ secrets.VSCE_PAT }}
28+
- name: Upload Release Asset
29+
if: github.event_name == 'release'
30+
run: gh release upload ${{ github.event.release.tag_name }} ${{ steps.package.outputs.vsix }}
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

RELEASING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Releasing
2+
3+
1. Update the bundled Motoko compiler: `npm i motoko@latest`
4+
2. Update `version` in `package.json`
5+
3. Commit and push to `master`
6+
4. Go to [GitHub Releases](https://github.com/caffeinelabs/vscode-motoko/releases) and draft a new release
7+
5. Create a new tag matching the version (e.g. `v0.21.0`)
8+
6. Leave the title blank so it's automatically populated with the version
9+
7. Generate release notes by clicking **Generate release notes**
10+
8. Click **Publish release**
11+
12+
The [release workflow](.github/workflows/release.yml) will automatically:
13+
- Build the `.vsix` extension
14+
- Publish it to the VS Code Marketplace
15+
- Upload the `.vsix` as a release asset

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-motoko",
33
"displayName": "Motoko",
44
"description": "Motoko language support",
5-
"version": "0.21.0",
5+
"version": "0.22.0",
66
"publisher": "dfinity-foundation",
77
"repository": "https://github.com/caffeinelabs/vscode-motoko",
88
"engines": {

0 commit comments

Comments
 (0)