Skip to content

Commit 0ed2e91

Browse files
authored
Working version with secured perms.
1 parent 3bc375e commit 0ed2e91

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ jobs:
88
JobBuild:
99
name: release
1010
runs-on: ubuntu-latest
11+
# Expose step outputs as job outputs
12+
outputs:
13+
currentversion: ${{ steps.package_version.outputs.current-version }}
14+
changelog_reader_changes: ${{ steps.changelog_reader.outputs.changes }}
1115
permissions:
1216
actions: read
1317
contents: read
@@ -34,7 +38,13 @@ jobs:
3438
- name: Get current package version
3539
id: package_version
3640
uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # v1.3.1
37-
41+
- name: Check version is mentioned in Changelog
42+
id: changelog_reader
43+
uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3
44+
with:
45+
validation_depth: 10
46+
version: ${{ steps.package_version.outputs.current-version }}
47+
path: 'CHANGELOG.md'
3848
JobsPublish:
3949
name: publish
4050
runs-on: ubuntu-latest
@@ -45,22 +55,15 @@ jobs:
4555
deployments: read
4656
packages: none
4757
steps:
48-
- name: Check version is mentioned in Changelog
49-
id: changelog_reader
50-
uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3
51-
with:
52-
validation_depth: 10
53-
version: ${{ steps.JobBuild.outputs.package_version }}
54-
path: 'CHANGELOG.md'
5558
- name: Create a Release
5659
id: create_release
5760
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
5861
env:
5962
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6063
with:
61-
tag_name : ${{ needs.JobBuild.outputs.package_version }}
62-
release_name: ${{ steps.JobBuild.outputs.current-version}}
63-
body: Publish ${{ steps.changelog_reader.outputs.changes }}
64+
tag_name : ${{ needs.JobBuild.outputs.currentversion }}
65+
release_name: ${{ needs.JobBuild.outputs.currentversion}}
66+
body: Publish ${{ needs.JobBuild.outputs.changelog_reader_changes }}
6467
- name: Create vsix and publish to marketplace
6568
id: create_vsix
6669
uses: HaaLeo/publish-vscode-extension@28e2d3f5817fccf23c1f219eb0cecc903132d1a2 # v1.6.2

0 commit comments

Comments
 (0)