Skip to content

Commit

Permalink
Fix GHA node deprecation warning
Browse files Browse the repository at this point in the history
Use GitHub cli to upload assets to release instead of the
softprops/action-gh-release action

Signed-off-by: James Taylor <jamest@uk.ibm.com>
  • Loading branch information
jt-nti committed Nov 11, 2022
1 parent 5a86047 commit f4bdc09
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ jobs:
CHAINCODE_LABEL: ${{ inputs.chaincode-label }}
CHAINCODE_VERSION: ${{ github.ref_name }}

- name: Release package
- name: Upload package
run: gh release upload $GITHUB_REF_NAME {CHAINCODE_LABEL}-${CHAINCODE_VERSION}.tgz
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: ${{ inputs.chaincode-label }}-${{ github.ref_name }}.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHAINCODE_LABEL: ${{ inputs.chaincode-label }}
CHAINCODE_VERSION: ${{ github.ref_name }}
12 changes: 6 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ jobs:
ls -l fabric-builder-k8s-${GOOS}-${GOARCH}.tgz
- name: Rename package
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/v')
run: |
export GOOS=$(go env GOOS)
mv fabric-builder-k8s-${GOOS}-${GOARCH}.tgz fabric-builder-k8s-${GITHUB_REF_NAME}-${GOOS}-${GOARCH}.tgz
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: fabric-builder-k8s-*.tgz
- name: Upload package
run: gh release upload $GITHUB_REF_NAME fabric-builder-k8s-${GITHUB_REF_NAME}-${GOOS}-${GOARCH}.tgz
if: startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit f4bdc09

Please sign in to comment.