mirror of
https://github.com/TrianguloY/UrlChecker.git
synced 2024-09-19 20:02:16 +02:00
Refactor alpha.yml action
- Parameterized - Removed dependency on third-party action EndBug/latest-tag
This commit is contained in:
parent
ffb97bc068
commit
1a19ba6584
27
.github/workflows/alpha.yml
vendored
27
.github/workflows/alpha.yml
vendored
@ -12,6 +12,11 @@ on:
|
||||
# Run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# parameters
|
||||
env:
|
||||
VARIANT: alpha
|
||||
TAG: alpha
|
||||
ZIP: app-alpha.zip
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -37,18 +42,20 @@ jobs:
|
||||
with:
|
||||
arguments: >
|
||||
build
|
||||
assembleAlpha
|
||||
assemble${{ env.VARIANT }}
|
||||
|
||||
- name: Zip apk # just remove the password here if you want to build the apk yourself
|
||||
run: zip -j -P ${{ secrets.ALPHA_PASS }} app-alpha.zip app/build/outputs/apk/alpha/app-alpha.apk
|
||||
- name: Zip ${{ env.VARIANT }} apk as ${{ env.ZIP }}
|
||||
# just remove the password here if you want to build the apk yourself
|
||||
run: zip -j -P ${{ secrets.ALPHA_PASS }} ${{ env.ZIP }} app/build/outputs/apk/${{ env.VARIANT }}/app-${{ env.VARIANT }}.apk
|
||||
|
||||
- name: Update alpha tag to latest commit
|
||||
uses: EndBug/latest-tag@latest
|
||||
with:
|
||||
ref: alpha
|
||||
- name: Update ${{ env.TAG }} tag to current commit
|
||||
# equivalent to EndBug/latest-tag@latest but simpler
|
||||
run: |
|
||||
git tag --force ${{ env.TAG }}
|
||||
git push --force origin tag ${{ env.TAG }}
|
||||
|
||||
- name: Upload zip to alpha release
|
||||
- name: Upload ${{ env.ZIP }} to ${{ env.TAG }} release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: alpha
|
||||
files: app-alpha.zip
|
||||
tag_name: ${{ env.TAG }}
|
||||
files: ${{ env.ZIP }}
|
||||
|
Loading…
Reference in New Issue
Block a user