mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
129 lines
4.9 KiB
YAML
129 lines
4.9 KiB
YAML
# docs https://github.com/marketplace/actions/create-release
|
|
# docs https://github.com/ncipollo/release-action
|
|
|
|
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
# electron build
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 16
|
|
- run: yarn install --frozen-lockfile
|
|
# make sure the ipfs executable is executable (linux only)
|
|
- run: node electron/downloadIpfs && sudo chmod +x bin/linux/ipfs
|
|
- run: CI='' yarn build
|
|
- run: yarn electron:build:linux
|
|
- run: ls dist
|
|
|
|
# publish version release
|
|
- uses: ncipollo/release-action@v1
|
|
with:
|
|
artifacts: 'dist/plebchan*.AppImage,dist/plebchan-html*.zip'
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
replacesArtifacts: true
|
|
body: "Progressive web app mirrors:\n- https://plebchan.eth.limo\n- https://plebchan.eth.link\n- https://cloudflare-ipfs.com/ipns/plebchan.eth (insecure, no subdomain isolation)\n\nCLI client:\n- https://github.com/plebbit/plebbit-cli/releases/latest"
|
|
allowUpdates: true
|
|
|
|
mac:
|
|
runs-on: macOS-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
# electron build
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 16
|
|
- run: yarn install --frozen-lockfile
|
|
- run: CI='' yarn build
|
|
- run: yarn electron:build:mac
|
|
- run: ls dist
|
|
|
|
# publish version release
|
|
- uses: ncipollo/release-action@v1
|
|
with:
|
|
artifacts: 'dist/plebchan*.dmg'
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
replacesArtifacts: true
|
|
body: "Progressive web app mirrors:\n- https://plebchan.eth.limo\n- https://plebchan.eth.link\n- https://cloudflare-ipfs.com/ipns/plebchan.eth (insecure, no subdomain isolation)\n\nCLI client:\n- https://github.com/plebbit/plebbit-cli/releases/latest"
|
|
allowUpdates: true
|
|
|
|
windows:
|
|
runs-on: windows-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
# electron build
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 16
|
|
- run: yarn install --frozen-lockfile
|
|
- run: setx CI "" && yarn build
|
|
- run: yarn electron:build:windows
|
|
- run: dir dist
|
|
|
|
# publish version release
|
|
- uses: ncipollo/release-action@v1
|
|
with:
|
|
artifacts: 'dist/plebchan*.exe'
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
replacesArtifacts: true
|
|
body: "Progressive web app mirrors:\n- https://plebchan.eth.limo\n- https://plebchan.eth.link\n- https://cloudflare-ipfs.com/ipns/plebchan.eth (insecure, no subdomain isolation)\n\nCLI client:\n- https://github.com/plebbit/plebbit-cli/releases/latest"
|
|
allowUpdates: true
|
|
|
|
# android:
|
|
# runs-on: ubuntu-latest
|
|
# permissions:
|
|
# contents: write
|
|
# steps:
|
|
# - uses: actions/checkout@v2
|
|
# - uses: actions/setup-java@v3
|
|
# with:
|
|
# distribution: 'zulu'
|
|
# java-version: '11'
|
|
# - uses: gradle/gradle-build-action@v2
|
|
# with:
|
|
# gradle-version: 7.6
|
|
# - uses: actions/setup-node@v2
|
|
# with:
|
|
# node-version: 16
|
|
# - run: sudo apt install -y apksigner zipalign
|
|
|
|
# # build react app
|
|
# - run: yarn install --frozen-lockfile
|
|
# - run: CI='' yarn build
|
|
# # build apk
|
|
# - run: npx cap update
|
|
# - run: npx cap copy
|
|
# - run: cd android && gradle bundle
|
|
# - run: cd android && ./gradlew assembleRelease
|
|
# # optimize apk
|
|
# - run: cd android/app/build/outputs/apk/release && zipalign 4 app-release-unsigned.apk app-release-unsigned-zip.apk
|
|
# # sign apk
|
|
# # to create keystore: keytool -genkey -v -keystore plebbit.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias release
|
|
# - run: cd android/app/build/outputs/apk/release && apksigner sign --ks ../../../../../plebbit.keystore --ks-pass pass:${{ secrets.PLEBBIT_REACT_KEYSTORE_PASSWORD }} --ks-key-alias release --out app-release-signed.apk app-release-unsigned-zip.apk
|
|
# # move apk to dist folder
|
|
# - run: mkdir -p dist && mv android/app/build/outputs/apk/release/app-release-signed.apk dist/plebbit-$(node -e "console.log(require('./package.json').version)").apk
|
|
# - run: ls dist
|
|
|
|
# # publish version release
|
|
# - uses: ncipollo/release-action@v1
|
|
# with:
|
|
# artifacts: 'dist/plebbit*.apk'
|
|
# token: ${{ secrets.GITHUB_TOKEN }}
|
|
# replacesArtifacts: true
|
|
# body: "Progressive web app mirrors:\n- https://plebchan.eth.limo\n- https://plebchan.eth.link\n- https://cloudflare-ipfs.com/ipns/plebchan.eth (insecure, no subdomain isolation)\n\nCLI client:\n- https://github.com/plebbit/plebbit-cli/releases/latest"
|
|
# allowUpdates: true
|