Skip to content

Commit dac6092

Browse files
committed
add create github release step
1 parent 3703790 commit dac6092

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

.github/workflows/cd.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
# types:
88
# - completed
99
push:
10+
branches:
11+
- "!*"
1012
tags:
11-
- "*"
13+
- '[0-9]+.[0-9]+.[0-9]+'
14+
# - "*"
1215
# https://stackoverflow.com/questions/58457140/dependencies-between-workflows-on-github-actions
1316
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run
14-
# https://github.com/actions/create-release
1517

1618
jobs:
1719
publish:
@@ -25,6 +27,23 @@ jobs:
2527
node-version: 14.x
2628
- name: Install Dependencies
2729
run: npm ci
30+
- name: Build extension package
31+
run: npm run build
32+
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions
33+
- name: Get release version
34+
run: echo "::set-output name=version::${GITHUB_REF#refs/*/}
35+
id: release-version
36+
- name: Create release notes for version ${{ steps.release-version.outputs.version }}
37+
run: npm run --silent changelog > RELEASE_NOTES_${{ steps.release-version.outputs.version }}.md
38+
# https://github.com/ncipollo/release-action
39+
- name: Create github release
40+
uses: ncipollo/release-action@v1
41+
with:
42+
name: ${{ steps.release-version.outputs.version }}
43+
artifact: "confluence-markup-${{ steps.release-version.outputs.version }}.vsix"
44+
artifactContentType: application/zip
45+
bodyFile: "RELEASE_NOTES_${{ steps.release-version.outputs.version }}.md"
46+
token: ${{ secrets.GITHUB_TOKEN }}
2847
- name: Publish to Visual Studio Marketplace
2948
run: ./node_modules/.bin/vsce publish -p ${{ secrets.VSCE_PAT }}
3049
- name: Publish to Open VSX Registry

0 commit comments

Comments
 (0)