Skip to content

Commit

Permalink
fix: Use outputs for Buf plugin workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenh committed May 28, 2022
1 parent 3ccaf89 commit 7017d4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
- name: Build
run: yarn build
- name: Release
id: release
run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
outputs:
release_version: ${{ steps.release.outputs.release_version }}

push_to_buf_registry:
name: Push Docker image to Buf Registry
Expand All @@ -86,8 +89,8 @@ jobs:
- name: Build Plugin image
run: docker build
--file ts-proto.Dockerfile
--tag plugins.buf.build/${{ secrets.BUF_USERNAME }}/ts-proto:${{ env.RELEASE_VERSION }}-0
--tag plugins.buf.build/${{ secrets.BUF_USERNAME }}/ts-proto:${{ needs.release.outputs.release_version }}-0
"."

- name: Push to Buf Registry
run: docker push plugins.buf.build/${{ secrets.BUF_USERNAME }}/ts-proto:${{ env.RELEASE_VERSION }}-0
run: docker push plugins.buf.build/${{ secrets.BUF_USERNAME }}/ts-proto:${{ needs.release.outputs.release_version }}-0
2 changes: 1 addition & 1 deletion release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ module.exports = {
'@semantic-release/npm',
'@semantic-release/github',
'@semantic-release/git',
['@semantic-release/exec', { publishCmd: 'echo "RELEASE_VERSION=${nextRelease.version}" >> $GITHUB_ENV' }],
['@semantic-release/exec', { publishCmd: 'echo "::set-output name=release_version::${nextRelease.version}"' }],
],
};

0 comments on commit 7017d4c

Please sign in to comment.