Skip to content

Create Release

Create Release #10

Workflow file for this run

name: Create Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
id-token: write # attestations
attestations: write # attestations
contents: write # gh-release
jobs:
release:
runs-on: macos-latest
timeout-minutes: 45
name: "Create release"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Use latest xcode
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
xcode-version: latest-stable
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: "next-9"
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install cargo
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-ios
- name: Install pnpm deps
run: pnpm install
- name: Get version
id: version
run: echo "VERSION=$(pnpm run --silent print-version)" >> "$GITHUB_OUTPUT"
- name: Formatting
run: pnpm run check-format
- name: Install wasm-pack
run: pnpm add -g wasm-pack
- name: Build yomikiri-dictionary-generator crate
run: cargo build
working-directory: ./crates/yomikiri-dictionary-generator
- name: Generate yomikiri dictionary
run: pnpm run generate:dictionary
- name: Build yomikiri-unidic crate
run: cargo build
working-directory: ./crates/unidic
- name: Generate unidic files
run: pnpm run generate:unidic
- name: Generate backend
run: pnpm run generate:release
working-directory: ./crates/yomikiri-backend
- name: Generate licenses
run: pnpm run generate:licenses
- name: Lint
run: pnpm run lint
- name: Test
run: pnpm run test
- name: Build web
run: pnpm run build:chrome && pnpm run build:firefox && pnpm run build:ios
- name: Create Chrome Extension
run: zip -r "yomikiri_chrome_v${{steps.version.outputs.VERSION}}.zip" ./chrome/*
working-directory: ./main/build
- name: Create Firefox Extension
run: zip -r "yomikiri_firefox_v${{steps.version.outputs.VERSION}}.zip" ./firefox/*
working-directory: ./main/build
- name: Create iOS App & Upload to XCode Connect
run: fastlane ios beta
working-directory: ./safari
env:
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
FASTLANE_USER: ${{ secrets.APP_STORE_USERNAME }}
APP_STORE_TEAM_ID: ${{ secrets.APP_STORE_TEAM_ID }}
APP_STORE_ITC_TEAM_ID: ${{ secrets.APP_STORE_ITC_TEAM_ID }}
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_KEY_CONTENT }}
- uses: actions/attest-build-provenance@v2
with:
subject-path: |
./main/build/yomikiri_firefox_v${{steps.version.outputs.VERSION}}.zip
./main/build/yomikiri_chrome_v${{steps.version.outputs.VERSION}}.zip
- name: Create Github Release
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2.0.9
with:
prerelease: true
files: |
./main/build/yomikiri_firefox_v${{steps.version.outputs.VERSION}}.zip
./main/build/yomikiri_chrome_v${{steps.version.outputs.VERSION}}.zip