mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-23 18:49:48 +02:00
fix(ci): checkout repo when downloading releases
also have something for workflow dispatches, so we dont need to upload them manually
This commit is contained in:
1 parent
337604c25d
commit
15d13529a8
1 file changed
+16
-7
@@ -3,18 +3,27 @@ name: "Upload debs"
|
|||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: "palera1n tag"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
env:
|
||||||
|
TAG: ${{ github.event.inputs.version || github.event.release.tag_name }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
upload:
|
upload:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download debs from release
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Download debs from tag
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
run: |
|
run: |
|
||||||
gh release download "${{ github.event.release.tag_name }}" \
|
gh release download "${{ env.TAG }}" --pattern "palera1n-iphoneos-arm*.deb"
|
||||||
--pattern "palera1n-iphoneos-arm64.deb" \
|
|
||||||
--pattern "palera1n-iphoneos-arm.deb"
|
|
||||||
|
|
||||||
if [ ! -f "palera1n-iphoneos-arm64.deb" ] || [ ! -f "palera1n-iphoneos-arm.deb" ]; then
|
if [ ! -f "palera1n-iphoneos-arm64.deb" ] || [ ! -f "palera1n-iphoneos-arm.deb" ]; then
|
||||||
echo "Debs not found :/"
|
echo "Debs not found :/"
|
||||||
@@ -32,8 +41,8 @@ jobs:
|
|||||||
|
|
||||||
ARM64_HASH=$(sha256sum palera1n-iphoneos-arm64.deb | cut -c1-8)
|
ARM64_HASH=$(sha256sum palera1n-iphoneos-arm64.deb | cut -c1-8)
|
||||||
ARM_HASH=$(sha256sum palera1n-iphoneos-arm.deb | cut -c1-8)
|
ARM_HASH=$(sha256sum palera1n-iphoneos-arm.deb | cut -c1-8)
|
||||||
cp palera1n-iphoneos-arm64.deb upload/pool/iphoneos-arm64/palera1n_${{ github.event.release.tag_name }}_${ARM64_HASH}_iphoneos-arm64.deb
|
cp palera1n-iphoneos-arm64.deb upload/pool/iphoneos-arm64/palera1n_${{ env.TAG }}_${ARM64_HASH}_iphoneos-arm64.deb
|
||||||
cp palera1n-iphoneos-arm.deb upload/pool/iphoneos-arm/palera1n_${{ github.event.release.tag_name }}_${ARM_HASH}_iphoneos-arm.deb
|
cp palera1n-iphoneos-arm.deb upload/pool/iphoneos-arm/palera1n_${{ env.TAG }}_${ARM_HASH}_iphoneos-arm.deb
|
||||||
|
|
||||||
cd upload
|
cd upload
|
||||||
|
|
||||||
@@ -41,5 +50,5 @@ jobs:
|
|||||||
git config user.email "[email protected]"
|
git config user.email "[email protected]"
|
||||||
|
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Update palera1n for ${{ github.event.release.tag_name }}" || exit 0
|
git commit -m "Update palera1n for ${{ env.TAG }}" || exit 0
|
||||||
git push https://$USERNAME:[email protected]/$GH_REPO.git
|
git push https://$USERNAME:[email protected]/$GH_REPO.git
|
||||||
Reference in new issue
Block a user