震度の凡例の表示条件を変更 #207
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
os: [windows, ubuntu] | |
arch: [x64, arm64] | |
env: | |
RELEASE_PREFIX: KyoshinEewViewer | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- uses: FranzDiebold/github-env-vars-action@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build | |
run: > | |
dotnet publish src/KyoshinEewViewer.Desktop/KyoshinEewViewer.Desktop.csproj | |
-c Release | |
-r ${{ fromJson('{ "windows": "win", "ubuntu": "linux" }')[matrix.os] }}-${{ matrix.arch }} | |
-o tmp | |
-p:PublishSingleFile=true | |
--self-contained true | |
env: | |
APP_VERSION: ${{ (contains(github.ref, 'tags/') && env.CI_ACTION_REF_NAME) || '0.1.1' }} | |
BUILD_NUMBER: ${{ env.CI_RUN_NUMBER }} | |
- name: Build updater | |
run: > | |
dotnet publish src/KyoshinEewViewer.Updater/KyoshinEewViewer.Updater.csproj | |
-c Release | |
-r ${{ fromJson('{ "windows": "win", "ubuntu": "linux" }')[matrix.os] }}-${{ matrix.arch }} | |
-o tmp2 | |
-p:PublishSingleFile=true | |
--self-contained true | |
env: | |
APP_VERSION: ${{ (contains(github.ref, 'tags/') && env.CI_ACTION_REF_NAME) || '0.1.1' }} | |
BUILD_NUMBER: ${{ env.CI_RUN_NUMBER }} | |
- name: Add permission | |
if: matrix.os != 'windows' | |
run: | | |
mv tmp/KyoshinEewViewer.Desktop tmp/KyoshinEewViewer | |
chmod +x tmp/KyoshinEewViewer | |
chmod +x tmp2/KyoshinEewViewer.Updater | |
- name: Rename files | |
if: matrix.os == 'windows' | |
run: move tmp/KyoshinEewViewer.Desktop.exe tmp/KyoshinEewViewer.exe | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ env.RELEASE_PREFIX }}-${{ matrix.os }}-${{ matrix.arch }} | |
path: tmp/* | |
- name: Upload updater artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ env.RELEASE_PREFIX }}Updater-${{ matrix.os }}-${{ matrix.arch }} | |
path: tmp2/* | |
- name: Archive | |
uses: TheDoctor0/zip-release@0.6.0 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
type: 'zip' | |
directory: tmp | |
path: '*' | |
filename: ../${{ env.RELEASE_PREFIX }}-${{ matrix.os }}-${{ matrix.arch }}.zip | |
- name: Archive updater | |
uses: TheDoctor0/zip-release@0.6.0 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
type: 'zip' | |
directory: tmp2 | |
path: '*' | |
filename: ../${{ env.RELEASE_PREFIX }}Updater-${{ matrix.os }}-${{ matrix.arch }}.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
${{ env.RELEASE_PREFIX }}-${{ matrix.os }}-${{ matrix.arch }}.zip | |
${{ env.RELEASE_PREFIX }}Updater-${{ matrix.os }}-${{ matrix.arch }}.zip | |
name: v${{ env.CI_ACTION_REF_NAME }} | |
draft: true | |
prerelease: false | |
publish-macos: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
arch: [x64, arm64] | |
env: | |
RELEASE_PREFIX: KyoshinEewViewer | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- uses: FranzDiebold/github-env-vars-action@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build | |
run: > | |
dotnet publish src/KyoshinEewViewer.Desktop/KyoshinEewViewer.Desktop.csproj | |
-c Release | |
-r osx-${{ matrix.arch }} | |
-o tmp | |
-p:PublishSingleFile=true | |
--self-contained true | |
env: | |
APP_VERSION: ${{ (contains(github.ref, 'tags/') && env.CI_ACTION_REF_NAME) || '0.1.1' }} | |
BUILD_NUMBER: ${{ env.CI_RUN_NUMBER }} | |
- name: Packaging | |
run: | | |
mkdir tmp2 | |
cp -r build-files/KyoshinEewViewer.Desktop.app tmp2/ | |
sed -i -e "s/KEVI_VERSION/$APP_VERSION/" tmp2/KyoshinEewViewer.Desktop.app/Contents/Info.plist | |
mkdir tmp2/KyoshinEewViewer.Desktop.app/Contents/MacOS | |
mv tmp/* tmp2/KyoshinEewViewer.Desktop.app/Contents/MacOS/ | |
env: | |
APP_VERSION: ${{ (contains(github.ref, 'tags/') && env.CI_ACTION_REF_NAME) || '0.1.1' }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ env.RELEASE_PREFIX }}-macos-${{ matrix.arch }} | |
path: tmp2/* | |
- name: Archive | |
uses: TheDoctor0/zip-release@0.6.0 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
type: 'zip' | |
directory: tmp2 | |
path: '*' | |
filename: ../${{ env.RELEASE_PREFIX }}-macos-${{ matrix.arch }}.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ${{ env.RELEASE_PREFIX }}-macos-${{ matrix.arch }}.zip | |
name: v${{ env.CI_ACTION_REF_NAME }} | |
draft: true | |
prerelease: false |