Skip to content

Commit

Permalink
(snap) M1 macでのSnapパッケージビルドテスト
Browse files Browse the repository at this point in the history
  • Loading branch information
Npepperlinux committed Feb 18, 2024
1 parent bc9dfb2 commit 7f4548f
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/snap_arm64_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: デプロイ(snap arm64)
on:
push:
workflow_dispatch:
release:
types: [published]

permissions:
contents: write

jobs:
build:
name: ビルド(Snap arm64)
runs-on: macos-14
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup snapcraft
run: |
brew install snap
brew install --cask multipass
- name: Build Snap
run: snapcraft

- name: Get Build Version
run: |
echo "VERSION=$(yq -r '.version' pubspec.yaml)" >> $GITHUB_ENV
- name: Upload snap
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload v$VERSION miria_${VERSION}_arm64.snap
# https://gihyo.jp/admin/serial/01/ubuntu-recipe/0660#sec3 : Snapパッケージアップロードまでの流れ
# https://github.com/snapcore/action-publish : Snap ActionのREADME.md
# Snap Storeでパッケージ名"miria"を予約後、"SNAPCRAFT_STORE_CREDENTIALS"を登録し、
# 以下をコメントアウトを解除することでSnap Storeへアップロードすることが可能です。
# Snap Storeでの公開後は、上記の"Upload snap"をコメントアウトしてください。
# (通常、SnapファイルをそのままStore外で公開することはありません)
#
#- name: Upload Snap Store
# uses: snapcore/action-publish@v1
# env:
# SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
# with:
# snap: ${{ steps.snapcraft.outputs.snap }}
# release: stable

0 comments on commit 7f4548f

Please sign in to comment.