Skip to content

v0.0.59-test-versioning.4 #82

v0.0.59-test-versioning.4

v0.0.59-test-versioning.4 #82

Workflow file for this run

name: Release
on:
release:
types: [published]
env:
SSC_REPO: 'playmint/socket'
SSC_BRANCH: 'playmint-next'
APP_NAME: 'playerchaindemo'
permissions:
contents: write
jobs:
macos:
name: macos
runs-on: macOS-14
timeout-minutes: 30
steps:
- name: configure certs
env:
CERTIFICATE_BASE64: ${{ secrets.SUBSTREAM_APPLE_SIGNING_CERT }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
P12_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
if [[ -z "$CERTIFICATE_BASE64" ]]; then
echo "No certificate provided"
exit 1
fi
echo -n "$CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
# create temporary keychain
if [[ -z "$KEYCHAIN_PASSWORD" ]]; then
echo "No keychain password provided"
exit 1
fi
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security default-keychain -s $KEYCHAIN_PATH
security find-identity -v -p codesigning
- name: checkout socket
uses: actions/checkout@v3
with:
repository: ${{ env.SSC_REPO }}
ref: '${{ env.SSC_BRANCH }}'
path: 'socket'
- name: install node
uses: actions/[email protected]
with:
node-version: 20.x
- name: cache socket build
id: cache-ssc
uses: actions/cache@v3
env:
cache-name: cache-ssc
with:
path: './socket/build'
key: ${{ runner.os }}-ssc-${{ hashFiles('socket/.git/refs/heads/*') }}
restore-keys: |
${{ runner.os }}-ssc-${{ env.cache-name }}-
${{ runner.os }}-ssc-
${{ runner.os }}-
- name: install deps
run: |
brew install automake pnpm libtool
- name: build ssc
working-directory: './socket'
run: |
./bin/install.sh
env:
VERBOSE: '1'
NO_ANDROID: '1'
NO_IOS: '1'
CI: 'true'
SSC_ANDROID_CI: 'false'
- name: checkout app
uses: actions/checkout@v3
with:
ref: '${{ github.event.release.target_commitish }}'
path: './app'
- name: build app
working-directory: './app'
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
VERSION: '${{ github.ref_name }}'
run: |
ssc --version
pnpm install
pnpm run release:macos
ls build/**/*
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: '${{ github.event.release.upload_url }}'
asset_path: './app/build/mac/${{ env.APP_NAME }}.zip'
asset_name: '${{ env.APP_NAME }}-macos-arm64.zip'
asset_content_type: 'application/zip'
linux:
name: linux
timeout-minutes: 30
runs-on: ubuntu-22.04
steps:
- name: checkout socket
uses: actions/checkout@v3
with:
repository: ${{ env.SSC_REPO }}
ref: '${{ env.SSC_BRANCH }}'
path: 'socket'
- name: install node
uses: actions/[email protected]
with:
node-version: 20.x
- name: install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: install deps
run: |
sudo apt-get update
sudo apt install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt install -y gcc-12 g++-12 libpthread-stubs0-dev libwebkit2gtk-4.1-dev at-spi2-core
sudo apt install -y \
git \
build-essential \
clang-14 \
libc++abi-14-dev \
libwebkit2gtk-4.1-dev \
autoconf \
pkg-config \
libtool \
libwebkit2gtk-4.1-dev \
curl
- name: cache socket build
id: cache-ssc
uses: actions/cache@v3
env:
cache-name: cache-ssc
with:
path: './socket/build'
key: ${{ runner.os }}-ssc-${{ hashFiles('socket/.git/refs/heads/*') }}
restore-keys: |
${{ runner.os }}-ssc-${{ env.cache-name }}-
${{ runner.os }}-ssc-
${{ runner.os }}-
- name: build ssc
working-directory: 'socket'
run: |
./bin/install.sh
env:
VERBOSE: '1'
NO_ANDROID: '1'
NO_IOS: '1'
CI: 'true'
SSC_ANDROID_CI: 'false'
- name: checkout app
uses: actions/checkout@v3
with:
ref: '${{ github.event.release.target_commitish }}'
path: './app'
- name: build app
working-directory: './app'
env:
VERSION: '${{ github.ref_name }}'
run: |
ssc --version
pnpm install
pnpm release:linux
ls build/**/*
mv build/linux/*.deb build/linux/${{ env.APP_NAME }}-linux-x64.deb
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: '${{ github.event.release.upload_url }}'
asset_path: './app/build/linux/${{ env.APP_NAME }}-linux-x64.deb'
asset_name: '${{ env.APP_NAME }}-linux-x64.deb'
asset_content_type: 'application/vnd.debian.binary-package'
windows:
name: windows
runs-on: windows-2022
timeout-minutes: 30
steps:
- name: checkout socket
uses: actions/checkout@v3
with:
repository: ${{ env.SSC_REPO }}
ref: '${{ env.SSC_BRANCH }}'
path: 'socket'
- name: install node
uses: actions/[email protected]
with:
node-version: 20.x
- name: install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
##############################
# disabled as ssc build fails ... wait til 0.6 released
###################################
# - name: cache socket build
# id: cache-ssc
# uses: actions/cache@v3
# env:
# cache-name: cache-ssc
# with:
# path: './socket/build'
# key: ${{ runner.os }}-ssc-${{ hashFiles('socket/.git/refs/heads/*') }}
# restore-keys: |
# ${{ runner.os }}-ssc-${{ env.cache-name }}-
# ${{ runner.os }}-ssc-
# ${{ runner.os }}-
# - name: build ssc
# working-directory: './socket'
# shell: pwsh
# run: |
# ./bin/install.ps1 -verbose -yesdeps
# env:
# NO_ANDROID: '1'
# SSC_ANDROID_CI: 'false'
# CI: 'true'
# WindowsSDKVersion: '10.0.22621.0'
# - name: ssc env
# working-directory: './socket'
# shell: pwsh
# run: |
# echo "::add-path::$env:LOCALAPPDATA\Programs\socketsupply\bin"
# echo "$env:LOCALAPPDATA\Programs\socketsupply\bin" >> $env:GITHUB_PATH
# env:
# ACTIONS_ALLOW_UNSECURE_COMMANDS: true
# - name: build app
# working-directory: './app'
# env:
# VERSION: '${{ github.ref_name }}'
# run: |
# ssc --version
# pnpm install
# pnpm run build
# ls build/**/*
# - name: Upload Release Asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: '${{ github.event.release.upload_url }}'
# asset_path: './app/build/win/${{ env.APP_NAME }}.appx'
# asset_name: '${{ env.APP_NAME }}-win-x64.appx'
# asset_content_type: 'application/appx'