-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create release on tag using GitHub actions (#19)
* build: add build actions * build: add release on tag * build: allow updates to already present release * build: update release name and body * chore: add release instructions to readme * chore: update name
- Loading branch information
1 parent
41329b3
commit 86a1f3c
Showing
2 changed files
with
52 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "zulu" | ||
java-version: "17" | ||
cache: "gradle" | ||
|
||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: "3.16.4" | ||
cache: true | ||
|
||
- run: flutter pub get | ||
- run: flutter build apk | ||
|
||
- name: Release APK | ||
uses: ncipollo/release-action@v1 | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
allowUpdates: true | ||
name: "KzShortner ${{ github.ref_name }}" | ||
body: "Check the assets for the APK." | ||
artifacts: "build/app/outputs/apk/release/*.apk" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
# kzlinks | ||
# KzShortner | ||
|
||
A new Flutter project. | ||
Shorten the URL. Broaden the reach. | ||
|
||
## Getting Started | ||
## How to create a release | ||
|
||
This project is a starting point for a Flutter application. | ||
> Make sure a Personal Access Token with access to `contents` with `access-read-write` added to repository secrets with name `TOKEN` | ||
A few resources to get you started if this is your first Flutter project: | ||
```bash | ||
git tag v0.1.0 # Create a tag and should be prefixed with v_ for eg. v1.0 | ||
``` | ||
|
||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) | ||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) | ||
|
||
For help getting started with Flutter development, view the | ||
[online documentation](https://docs.flutter.dev/), which offers tutorials, | ||
samples, guidance on mobile development, and a full API reference. | ||
```bash | ||
git push v0.1.0 | ||
``` |