Skip to content

Fix release

Fix release #183

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASS: ${{ secrets.KEY_PASS }}
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
KEYSTORE: ${{ secrets.KEYSTORE }}
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