From 7f4548f357dd89d8282e0a4558f30d1719ad9857 Mon Sep 17 00:00:00 2001 From: Npepperlinux Date: Sun, 18 Feb 2024 12:23:07 +0900 Subject: [PATCH] =?UTF-8?q?(snap)=20M1=20mac=E3=81=A7=E3=81=AESnap?= =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC=E3=82=B8=E3=83=93=E3=83=AB?= =?UTF-8?q?=E3=83=89=E3=83=86=E3=82=B9=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/snap_arm64_deploy.yml | 51 +++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/snap_arm64_deploy.yml diff --git a/.github/workflows/snap_arm64_deploy.yml b/.github/workflows/snap_arm64_deploy.yml new file mode 100644 index 000000000..0b7aa8229 --- /dev/null +++ b/.github/workflows/snap_arm64_deploy.yml @@ -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 +