diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 26060cd..3e8a800 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -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 }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index afbdbcb..069acf4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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 }}