Skip to content

fix: tmpfs cleanup, add github workflow #1

fix: tmpfs cleanup, add github workflow

fix: tmpfs cleanup, add github workflow #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get tag
id: tag
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
- name: Update update.json
env:
VERSION: ${{ steps.tag.outputs.VERSION }}
REPO: ${{ github.repository }}
run: |
NEW_CODE=$(( $(jq -r '.versionCode' update.json) + 1 ))
jq --arg v "$VERSION" \
--argjson c "$NEW_CODE" \
--arg z "https://github.com/${REPO}/releases/download/${VERSION}/CustomCACert-${VERSION}.zip" \
--arg cl "https://github.com/${REPO}/releases/tag/${VERSION}" \
'.version=$v | .versionCode=$c | .zipUrl=$z | .changelog=$cl' \
update.json > tmp.json && mv tmp.json update.json
- name: Commit update.json
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add update.json
git diff --cached --quiet || git commit -m "Update update.json for ${{ steps.tag.outputs.VERSION }}"
git push origin HEAD:main
- name: Build zip
run: |
zip -r "CustomCACert-${{ steps.tag.outputs.VERSION }}.zip" \
META-INF \
module.prop \
post-fs-data.sh \
system \
LICENSE \
update.json
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: CustomCACert-${{ steps.tag.outputs.VERSION }}.zip
generate_release_notes: true