Skip to content

Translate ja.json via GitLocalize (#171) #78

Translate ja.json via GitLocalize (#171)

Translate ja.json via GitLocalize (#171) #78

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
tags-ignore:
- '*'
pull_request:
branches: [ master ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_HARD_LINKS: 'false'
jobs:
build:
# if: "!contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
if: "github.event_name == 'pull_request' || !contains(github.event.head_commit.message, 'skip ci')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
include:
- os: windows-latest
osname: windows
packname: win
travistag: latest-windows
- os: macos-latest
osname: osx
packname: 'mac:skip-notarize'
travistag: latest-osx
- os: ubuntu-latest
osname: linux
packname: linux
travistag: latest-linux
env:
TRAVIS_OS_NAME_: ${{ matrix.osname }}
TRAVIS_TAG: ${{ matrix.travistag }}
steps:
- run: echo 'TRAVIS_OS_NAME_:' ${{ env.TRAVIS_OS_NAME_ }}
#- run: echo '::set-env name=TRAVIS_TAG::latest-${{ env.TRAVIS_OS_NAME_ }}'
- run: echo 'TRAVIS_TAG:' ${{ env.TRAVIS_TAG }}
- run: 'echo "GITHUB_RUN_NUMBER: ${{ github.run_number }}"'
- run: 'echo "GITHUB_RUN_ID: ${{ github.run_id }}"'
- run: 'echo "GITHUB_SHA: ${{ github.sha }}"'
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta #actions/setup-node@v1
with:
node-version: '18'
#check-latest: true
- run: node --version && npm --version
#- run: npm --global install npm@latest
- run: npm --global install npm@^9
- run: npm --version
- run: npm --global install yarn@^1
# - run: ((curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.5) || echo "YARN OK")
# - run: export PATH="$HOME/.yarn/bin:$PATH"
- run: yarn --version
- run: yarn config set network-timeout 300000 || echo ok
# - run: yarn --global install asar
- run: node build/package-ci-patch.js package.json ${{ github.run_id }} && cat package.json | grep -i VERSION && cat package.json
- run: node build/package-ci-patch.js package-asar.json ${{ github.run_id }} && cat package-asar.json | grep -i VERSION && cat package-asar.json
- run: node build/package-ci-patch.js package-asar-dev.json ${{ github.run_id }} && cat package-asar-dev.json | grep -i VERSION && cat package-asar-dev.json
#- run: pwd && ls && cd .. && pwd && ls && git clone https://github.com/daisy/ace.git && cd ace && pwd && ls && git checkout ace-next-local-packs && yarn ace-app-prepare && pwd && ls && cd .. && pwd && ls && cd ace-gui && pwd && ls
#- run: rm -f yarn.lock && rm -rf node_modules && yarn install
- run: yarn --frozen-lockfile
- run: git submodule init && git submodule update
- run: git --no-pager diff package.json && git --no-pager diff package-asar.json && git --no-pager diff package-asar-dev.json
- name: PR action (just build)
if: ${{ github.event_name == 'pull_request' }}
run: yarn build:prod
- name: non-PR action (build and package)
if: ${{ github.event_name != 'pull_request' }}
run: yarn package:${{ matrix.packname }}
#- run: ls -alsR release
#- run: yarn install @octokit/rest
- name: GitHub Tagged Release Delete/ReCreate and Upload Build Artefacts
if: ${{ github.event_name != 'pull_request' }}
run: node build/release-github.js
# - name: Upload Artifact
# if: ${{ github.event_name != 'pull_request' }}
# uses: actions/upload-artifact@v2
# with:
# name: Ace App
# path: ./dist/*.exe
# - name: Delete Release
# if: ${{ github.event_name != 'pull_request' }}
# uses: author/action-rollback@stable
# with:
# tag: $TRAVIS_TAG
# always_delete_tag: true
# - name: GitHub Release
# if: ${{ github.event_name != 'pull_request' }}
# id: create_release
# uses: actions/create-release@v1
# with:
# tag_name: $TRAVIS_TAG
# release_name: '[$TRAVIS_TAG] continuous test build (prerelease)'
# body: 'GitHub Action build job: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID'
# draft: false
# prerelease: true
# - name: GitHub Release Assets
# if: ${{ github.event_name != 'pull_request' }}
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./dist/*.exe
# asset_name: Ace App.exe
# asset_content_type: application/octet-stream
# - name: GitHub Script Release And Assets
# if: ${{ github.event_name != 'pull_request' }}
# env:
# - GH_RELEASE_ID: ${{ steps.create_release.outputs.id }}
# uses: actions/github-script@v2
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# script: |
# console.log('process.versions', process.versions, process.env.GH_RELEASE_ID);
# const fs = require('fs').promises;
# const { repo: { owner, repo }, sha } = context;
# /*
# const release = await github.repos.createRelease({
# name: `[${process.env.TRAVIS_TAG}] continuous test build (prerelease)`,
# body: `GitHub Action build job: ${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
# owner,
# repo,
# tag_name: process.env.TRAVIS_TAG,
# draft: false,
# prerelease: true,
# target_commitish: sha
# });
# */
# for (let file of await fs.readdir('release')) {
# if (!file.endsWith('.exe') || !file.endsWith('.AppImage') || !file.endsWith('.msi') || !file.endsWith('.deb') || !file.endsWith('.dmg')) {
# continue;
# }
# await github.repos.uploadReleaseAsset({
# owner,
# repo,
# release_id: process.env.GH_RELEASE_ID, // release.data.id,
# name: file,
# data: await fs.readFile(`./dist/${file}`)
# });
# }