action-gh-release
action-gh-release copied to clipboard
GitHub Releases requires a tag
Hi @softprops , I'm using the following code to create an artifact and then to be able to automatically create a release.
At the time of creation I don't have a tag, how can I do?
on:
workflow_dispatch:
inputs:
name: Build
jobs:
install-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install npm dependencies
run: |
npm install
build-android:
needs: install-and-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install npm dependencies
run: |
npm install
- name: Build Android Release
run: |
cd android && ./gradlew assembleRelease
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: app-release.apk
path: android/app/build/outputs/apk/release/
- name: Release
uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
with:
# Identify if this is a pre release by checking if the tag name contains -rc, -b, -a
# prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-b') || contains(github.ref, '-a') }}
files: android/app/build/outputs/apk/release/app-release.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
This is a duplicate of #270.