Skip to content

v0.1.29

v0.1.29 #56

Workflow file for this run

# 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
- run: node electron/download-ipfs && sudo chmod +x bin/linux/ipfs
- run: yarn build
- run: yarn electron:build:linux
- run: ls dist
# publish version release
- uses: ncipollo/release-action@v1
with:
artifacts: 'dist/plebbit*.AppImage,dist/plebbit-html*.zip'
token: ${{ secrets.GITHUB_TOKEN }}
replacesArtifacts: true
body: "Progressive web app mirrors:\n- https://plebbitapp.eth.limo\n- https://plebbitapp.eth.link\n- https://cloudflare-ipfs.com/ipns/plebbitapp.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
# install missing dep for sqlite
- run: python3 -m ensurepip
- run: pip install setuptools
- run: yarn install --frozen-lockfile
# make sure the ipfs executable is executable
- run: node electron/download-ipfs && sudo chmod +x bin/mac/ipfs
- run: yarn build
- run: yarn electron:build:mac
- run: ls dist
# publish version release
- uses: ncipollo/release-action@v1
with:
artifacts: 'dist/plebbit*.dmg'
token: ${{ secrets.GITHUB_TOKEN }}
replacesArtifacts: true
body: "Progressive web app mirrors:\n- https://plebbitapp.eth.limo\n- https://plebbitapp.eth.link\n- https://cloudflare-ipfs.com/ipns/plebbitapp.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: yarn build
- run: yarn electron:build:windows
- run: dir dist
# publish version release
- uses: ncipollo/release-action@v1
with:
artifacts: 'dist/plebbit*.exe'
token: ${{ secrets.GITHUB_TOKEN }}
replacesArtifacts: true
body: "Progressive web app mirrors:\n- https://plebbitapp.eth.limo\n- https://plebbitapp.eth.link\n- https://cloudflare-ipfs.com/ipns/plebbitapp.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
with:
# needed to use 'git tag' and get all tags
fetch-depth: 0
- 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: yarn build
# set android versionCode and versionName
- run: sed -i "s/versionCode 1/versionCode $(git tag | wc -l)/" ./android/app/build.gradle
- run: sed -i "s/versionName \"1.0\"/versionName \"$(node -e "console.log(require('./package.json').version)")\"/" ./android/app/build.gradle
- run: cat ./android/app/build.gradle
# 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://plebbitapp.eth.limo\n- https://plebbitapp.eth.link\n- https://cloudflare-ipfs.com/ipns/plebbitapp.eth (insecure, no subdomain isolation)\n\nCLI client:\n- https://github.com/plebbit/plebbit-cli/releases/latest"
allowUpdates: true