Skip to content

Release

Release #21

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
release:
name: Create release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Extract version name
id: extract_name
run: echo "name=$(echo ${GITHUB_REF##*/})" >>$GITHUB_OUTPUT
shell: bash
- name: Checkout to push branch
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Generate changelog
id: changelog
uses: metcalfc/[email protected]
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
id: create_release
uses: ncipollo/release-action@v1
with:
name: Release ${{ steps.extract_name.outputs.name }}
body: ${{ steps.changelog.outputs.changelog }}
build-desktop:
name: Build desktop release
strategy:
matrix:
platform: [ ubuntu-20.04, windows-2019, macos-12 ]
runs-on: ${{ matrix.platform }}
needs: release
steps:
- name: Checkout to push branch
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Extract version from tag
uses: damienaicheh/[email protected]
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'corretto'
- name: Build distribution file
if: job.status == 'success'
run: |
export GRADLE_USER_HOME=$(pwd)/.gradle
export CLIENT_HOST=${{ secrets.CLIENT_HOST }}
export CLIENT_PROTOCOL=https
chmod +x ./gradlew
./gradlew composeApp:packageReleaseDistributionForCurrentOS
shell: bash
env:
VERSION: ${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}
- name: Upload deb artifact file to workflow run results
uses: actions/upload-artifact@v3
if: runner.os == 'Linux'
with:
name: Shin-${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}.deb
path: composeApp/build/compose/binaries/main-release/deb/shin_${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}-1_amd64.deb
- name: Upload deb artifact file to release
uses: actions/upload-release-asset@v1
if: runner.os == 'Linux'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./composeApp/build/compose/binaries/main-release/deb/shin_${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}-1_amd64.deb
asset_name: Shin-${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}.deb
asset_content_type: application/x-deb
- name: Upload msi installer file to workflow run results
uses: actions/upload-artifact@v3
if: runner.os == 'Windows'
with:
name: Shin-${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}.msi
path: composeApp/build/compose/binaries/main-release/msi/Shin-${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}.msi
- name: Upload msi installer file to release
uses: actions/upload-release-asset@v1
if: runner.os == 'Windows'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./composeApp/build/compose/binaries/main-release/msi/Shin-${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}.msi
asset_name: Shin-${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}.msi
asset_content_type: application/x-ms-dos-executable
- name: Upload dmg image file to workflow run results
uses: actions/upload-artifact@v3
if: runner.os == 'macOS'
with:
name: Shin-${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}.dmg
path: composeApp/build/compose/binaries/main-release/dmg/Shin-${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}.dmg
- name: Upload dmg image file to release
uses: actions/upload-release-asset@v1
if: runner.os == 'macOS'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./composeApp/build/compose/binaries/main-release/dmg/Shin-${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}.dmg
asset_name: Shin-${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}.dmg
asset_content_type: application/octet-stream
build-web:
name: Build web release
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout to push branch
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'corretto'
- name: Build Wasm Distribution
if: job.status == 'success'
run: |
export GRADLE_USER_HOME=$(pwd)/.gradle
export CLIENT_HOST=${{ secrets.CLIENT_HOST }}
export CLIENT_PROTOCOL=https
chmod +x ./gradlew
./gradlew composeApp:wasmJsBrowserDistribution
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./composeApp/build/dist/wasmJs/productionExecutable
force_orphan: true
cname: sh.procyk.in