Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanndroid authored Mar 12, 2022
1 parent 58cda08 commit 2b763e3
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: New Release
on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Init values
id: values
run: |
version=$(grep -Po -m 1 '(?<=versionName ).*' ./app/build.gradle | tr -d \")
echo ::set-output name=name::NotiNotes v$version
echo ::set-output name=tag::v$version
echo ::set-output name=apk::NotiNotes_v$version
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: ${{ steps.values.outputs.name }}
tag_name: ${{ steps.values.outputs.tag }}
body: Changelog
- name: Add apk
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./app/release/app-release.apk
asset_name: ${{ steps.values.outputs.apk }}.apk
asset_content_type: application/vnd.android.package-archive

0 comments on commit 2b763e3

Please sign in to comment.