Skip to content

Commit 3cb858f

Browse files
committed
ci: Try to also release to github registry
1 parent 212f71c commit 3cb858f

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/generator.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,18 @@ jobs:
5757
env:
5858
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5959
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
60+
- name: Did release?
61+
id: did_release
62+
run: '(test -f .new-version && echo "::set-output name=new_release_published::true" && echo "::set-output name=new_release_version::$(cat ./.new-version)") || echo "::set-output name=new_release_published::false"'
6063
- name: Setup node for Github Registry
61-
if: steps.semantic.outputs.new_release_published == 'true'
64+
if: steps.did_release.outputs.new_release_published == 'true'
6265
uses: actions/setup-node@v2
6366
with:
6467
node-version: 16
6568
registry-url: 'https://npm.pkg.github.com'
6669
scope: 'svrooij'
6770
- name: Publish To GitHub Package Registry
68-
if: steps.semantic.outputs.new_release_published == 'true'
71+
if: steps.did_release.outputs.new_release_published == 'true'
6972
run: |
7073
npm publish
7174
env:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,6 @@ dist
102102

103103
# TernJS port file
104104
.tern-port
105+
106+
# .new-version file used in Github workflow
107+
.new-version

generator/sonos-docs/.releaserc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
'@semantic-release/release-notes-generator',
66
'@semantic-release/npm',
77
'@semantic-release/github',
8-
['@semantic-release/exec', { success: 'echo "::set-output name=new_release_published::true"' }],
8+
['@semantic-release/exec', { success: 'echo "${nextRelease.version}" > ./.new-version' }],
99
]
1010
}

0 commit comments

Comments
 (0)