Skip to content

Update workflow action #278

Update workflow action

Update workflow action #278

Workflow file for this run

name: Build Package
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Import PAT from Actions secrets
run: |
cd SwiftPamphletApp/App
sed -i '' s/'gitHubAccessToken = ""'/'gitHubAccessToken = "${{ secrets.PAT }}"'/ SwiftPamphletAppConfig.swift
cd ..
- name: Build
run: |
if grep -q 'gitHubAccessToken = ""' ./SwiftPamphletApp/App/SwiftPamphletAppConfig.swift ; then
echo "please setup your personal access token to Actions secrets and name it to PAT" && exit
fi
chmod +x ./compile.command
/bin/bash -c ./compile.command
zip -r9 戴铭的开发小册子.zip 戴铭的开发小册子.app
- name: Upload App.zip
uses: actions/upload-artifact@v4
with:
name: "戴铭的开发小册子.zip"
path: "戴铭的开发小册子.zip"