forked from manjaro/release-review
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.49 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Copy release to the mirror
on:
release:
types: [edited]
workflow_dispatch:
inputs:
release-tag:
description: 'Release tag'
required: true
default: 'latest'
concurrency:
group: "mirror"
cancel-in-progress: true
env:
download_dir: download
jobs:
release:
runs-on: ubuntu-latest
name: Copy release to the mirror
environment:
name: stable-mirror
url: https://release.manjaro.download
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: download & extract release assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release view ${{ inputs.release-tag || github.event.release.tag_name }} --json assets --jq '[[.assets[]][] | select(.name | contains("-unstable-") | not) | select(.name | contains("-testing-") | not)]' >docs/assets.json
mkdir -p $download_dir
cat docs/assets.json | jq '.[].url' | xargs wget -q -P $download_dir
# unzip files
for file in $download_dir/*.iso.zip; do
zip -FF $file --out manjaro-full.zip && unzip manjaro-full.zip -d $download_dir/
done
## remove unzipped files
rm -f $download_dir/*.zip || echo ok
rm -f $download_dir/*.z01 || echo ok
ls $download_dir