From 716dbc9f08ecc95ca63f7fb613a028fde6821ea5 Mon Sep 17 00:00:00 2001 From: robshape Date: Tue, 25 Apr 2023 15:16:28 +0200 Subject: [PATCH] ci: Create GitHub release in workflow --- .github/workflows/create-release.yaml | 24 +++++++++++++++++++++--- README.md | 2 +- skeleton/BASE/SHORTCUTS.txt | 8 ++++---- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml index 6a45a3c..008ade2 100644 --- a/.github/workflows/create-release.yaml +++ b/.github/workflows/create-release.yaml @@ -1,5 +1,7 @@ name: Build and release on: workflow_dispatch +permissions: + contents: write jobs: build-and-release: @@ -33,7 +35,23 @@ jobs: export UNION_PLATFORM=rg35xx make all - - name: Create release + - name: Name Git tag run: | - ls -a ./releases/ - echo "TODO" + export GIT_TAG=$(cat ./build/latest.txt) + echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV + + - name: Create Git tag + uses: mathieudutour/github-tag-action@v6.1 + id: tag_version + with: + custom_tag: ${{env.GIT_TAG}} + dry_run: true + github_token: ${{secrets.GITHUB_TOKEN}} + + - name: Create GitHub release + uses: ncipollo/release-action@v1.12.0 + with: + artifacts: "releases/*b-0-full.zip" + draft: true + prerelease: true + tag: ${{steps.tag_version.outputs.new_tag}} diff --git a/README.md b/README.md index 9f8084a..a58196c 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Run `./start-toolchain.sh` and then `make all` in the Docker container shell. - ~~Add to Favorites~~ - ~~Adjust battery capacity readings (2100 mAh, 2600 mAh, 3500 mAh)~~ - ~~Update visible MinUI strings (show that it is the FinUI fork)~~ -- Release using GitHub Actions +- ~~Release using GitHub Actions~~ - Adjust overclocking and CPU usage (to maximize battery life) - Improve battery capacity reading accuracy - [...things in the old todo?...](./todo.txt) diff --git a/skeleton/BASE/SHORTCUTS.txt b/skeleton/BASE/SHORTCUTS.txt index 72f7e3a..d2c8dad 100644 --- a/skeleton/BASE/SHORTCUTS.txt +++ b/skeleton/BASE/SHORTCUTS.txt @@ -2,7 +2,7 @@ # Shortcuts # ############# -| Description | Shortcut | -| ---------------------------- | ---------------------------- | -| Adjust brightness | MENU + VOLUME_DOWN/VOLUME_UP | -| Add to Favorites (from menu) | SELECT | +| Description | Shortcut | +| -------------------------------- | ---------------------------- | +| Adjust brightness | MENU + VOLUME_DOWN/VOLUME_UP | +| Add/remove Favorites (from menu) | SELECT |