diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c73efd2..fcc4c14 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,41 +42,30 @@ jobs: - name: prepare release artifacts run: VERSION=${{ steps.version.outputs.version }} make release - - name: Github release - uses: actions/create-release@v1 - id: gh_release - with: - draft: false - prerelease: false - release_name: ${{ github.ref_name }} - tag_name: ${{ github.ref_name }} - body_path: RELEASE.md - env: - GITHUB_TOKEN: ${{ github.token }} - - name: upload cfapi crd - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.gh_release.outputs.upload_url }} - asset_path: ./release-${{ steps.version.outputs.version }}/cfapi-crd.yaml - asset_name: cfapi-crd.yaml - asset_content_type: yaml - - name: upload release default CR yaml - uses: actions/upload-release-asset@v1 + + - name: Create draft release env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.gh_release.outputs.upload_url }} - asset_path: ./release-${{ steps.version.outputs.version }}/cfapi-default-cr.yaml - asset_name: cfapi-default-cr.yaml - asset_content_type: yaml - - name: upload release controller yaml - uses: actions/upload-release-asset@v1 + VERSION: ${{ steps.version.outputs.version }} + GH_TOKEN: ${{ github.token }} + shell: bash + run: | + gh release create "${VERSION}" --draft --notes-file RELEASE.md + + - name: Publish Release + env: + VERSION: ${{ steps.version.outputs.version }} + GH_TOKEN: ${{ github.token }} + shell: bash + run: | + gh release edit "${VERSION}" --draft=false --latest + + - name: Upload release artifacts env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.gh_release.outputs.upload_url }} - asset_path: ./release-${{ steps.version.outputs.version }}/cfapi-manager.yaml - asset_name: cfapi-manager.yaml - asset_content_type: yaml \ No newline at end of file + VERSION: ${{ steps.version.outputs.version }} + GH_TOKEN: ${{ github.token }} + shell: bash + run: | + gh release upload "${VERSION}" "./release-${VERSION}/cfapi-default-cr.yaml" + gh release upload "${VERSION}" "./release-${VERSION}/cfapi-crd.yaml" + gh release upload "${VERSION}" "./release-${VERSION}/cfapi-manager.yaml" + \ No newline at end of file