Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

[RFC] If encounter duplicate releases, change get tag info #56

Open
DiamondYuan opened this issue Apr 1, 2020 · 4 comments
Open

[RFC] If encounter duplicate releases, change get tag info #56

DiamondYuan opened this issue Apr 1, 2020 · 4 comments

Comments

@DiamondYuan
Copy link

I have 2 workflow. Create mac and windows version.
If first workflow success , second workflow will failed.
i think create-release support ignore duplicate and return the info of duplicate releases.

@DiamondYuan
Copy link
Author

DiamondYuan commented Apr 1, 2020

Add a new config allow_duplicate,if duplicate, will return correct outputs.

name: Release

on:
  push:
    branches:
      - master

jobs:
  build_on_win:
    runs-on: windows-latest
    steps:
      - name: Create Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          allow_duplicate: true
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}
          draft: false
          prerelease: false
      - name: Upload Release Asset
        id: upload-release-asset
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: ./out/umi-electron-boilerplate.zip
          asset_name: umi-electron-boilerplate.zip
          asset_content_type: application/zip

@DiamondYuan
Copy link
Author

i can make a pr

@asbjornu
Copy link

As I usually create releases manually, I don't really need create-release, but since actions/upload-release-asset@v1 is configured with upload_url: ${{ steps.create_release.outputs.upload_url }}, I'm unable to upload release assets without create-release executing successfully.

Allowing create-release to succeed given an existing release would help remedy this problem.

@DiamondYuan
Copy link
Author

As I usually create releases manually, I don't really need create-release, but since actions/upload-release-asset@v1 is configured with upload_url: ${{ steps.create_release.outputs.upload_url }}, I'm unable to upload release assets without create-release executing successfully.

Allowing create-release to succeed given an existing release would help remedy this problem.

https://github.com/DiamondYuan/umi-electron-boilerplate/blob/master/actions/release/action.yml
I fork and move action to my own project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants