-
-
Notifications
You must be signed in to change notification settings - Fork 30
91 lines (81 loc) · 3.34 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
android-build:
uses: KoalaSat/nostros/.github/workflows/android-build.yml@main
release:
needs: [android-build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Release
id: create-release
uses: softprops/action-gh-release@v1
with:
body: |
**New Nostros Release [${{ github.ref_name }}]**
**Download**
https://github.com/KoalaSat/nostros/releases/download/${{ github.ref_name }}/nostros-${{ github.ref_name }}-universal.apk
**Torrent**
https://github.com/KoalaSat/nostros/releases/download/${{ github.ref_name }}/nostros-${{ github.ref_name }}-universal.torrent
**Changelog**
https://github.com/KoalaSat/nostros/releases/${{ github.ref_name }}
# Upload APK artifact asset
- name: 'Download universal APK Artifact'
uses: actions/download-artifact@v3
with:
name: nostros-${{ github.ref_name }}-universal.apk
path: .
- name: 'Download arm64-v8a APK Artifact'
uses: actions/download-artifact@v3
with:
name: nostros-${{ github.ref_name }}-arm64-v8a.apk
path: .
- name: 'Download armeabi-v7a APK Artifact'
uses: actions/download-artifact@v3
with:
name: nostros-${{ github.ref_name }}-armeabi-v7a.apk
path: .
- name: 'Upload universal APK Asset'
id: upload-universal-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: app-universal-release.apk
asset_name: nostros-${{ github.ref_name }}-universal.apk
asset_content_type: application/apk
- name: 'Upload arm64-v8a APK Asset'
id: upload-arm64-v8a-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: app-arm64-v8a-release.apk
asset_name: nostros-${{ github.ref_name }}-arm64-v8a.apk
asset_content_type: application/apk
- name: 'Upload armeabi-v7a APK Asset'
id: upload-armeabi-v7a-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: app-armeabi-v7a-release.apk
asset_name: nostros-${{ github.ref_name }}-armeabi-v7a.apk
asset_content_type: application/apk
- name: Install torf-cli
run: sudo pip3 install torf-cli
- name: Create torrent using torf-cli
run: torf "nostros-${{ github.ref_name }}-universal.apk" -o "nostros-${{ github.ref_name }}-universal.torrent" -w "https://github.com/KoalaSat/nostros/releases/download/${{ github.ref_name }}/nostros-${{ github.ref_name }}-universal.apk" -s "torrent-webseed-creator"
- name: Upload torrent file
uses: actions/upload-artifact@v3
with:
name: Torrent
path: nostros-${{ github.ref_name }}-universal.torrent