Initial Netflex TV app
This commit is contained in:
44
.gitea/workflows/release.yml
Normal file
44
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
# On a tag (v1.2.3): build inside a SmartFox checkout (sf-ui lives there),
|
||||
# sign, and publish a release with the three store assets.
|
||||
#
|
||||
# Secrets:
|
||||
# SF_SIGNING_KEY base64 of key.pem on one line (base64 -w0 key.pem)
|
||||
# SMARTFOX_TOKEN read access to bluefox/fox-in-the-box (it is private)
|
||||
name: release
|
||||
on:
|
||||
push:
|
||||
tags: ["v*"]
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: debian:trixie
|
||||
env:
|
||||
SMARTFOX_REPO: gitea.bluefox.support/bluefox/fox-in-the-box
|
||||
steps:
|
||||
- name: Checkout
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq --no-install-recommends build-essential pkg-config curl ca-certificates git jq \
|
||||
libfontconfig1-dev libfreetype-dev libxkbcommon-dev \
|
||||
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev >/dev/null
|
||||
git clone --depth 1 "https://oauth2:${{ secrets.SMARTFOX_TOKEN }}@${SMARTFOX_REPO}.git" work
|
||||
git clone --depth 1 --branch "$GITHUB_REF_NAME" \
|
||||
"${GITHUB_SERVER_URL%%://*}://oauth2:${{ secrets.GITHUB_TOKEN }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git" work/apps/netflex-tv
|
||||
- name: Build and sign
|
||||
env:
|
||||
SF_SIGNING_KEY: ${{ secrets.SF_SIGNING_KEY }}
|
||||
run: |
|
||||
curl -sSf https://sh.rustup.rs | sh -s -- -y -q --profile minimal
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cd work/apps/netflex-tv && ./package.sh
|
||||
- name: Release
|
||||
env:
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
api="$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/releases"
|
||||
id=$(curl -fsS -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \
|
||||
-d "{\"tag_name\":\"$GITHUB_REF_NAME\",\"name\":\"$GITHUB_REF_NAME\"}" "$api" | jq -r .id)
|
||||
for f in work/apps/netflex-tv/dist/*; do
|
||||
curl -fsS -H "Authorization: token $TOKEN" -F "attachment=@$f" "$api/$id/assets?name=$(basename "$f")" >/dev/null
|
||||
done
|
||||
Reference in New Issue
Block a user