diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6185c25 --- /dev/null +++ b/.github/workflows/release.yml @@ -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