-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Separate original workflow to make build and release logic reusable for different triggers --------- Co-authored-by: Steven0351 <[email protected]>
- Loading branch information
1 parent
f304c9d
commit b0daa51
Showing
4 changed files
with
82 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build and Release | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
release-version: | ||
required: true | ||
type: string | ||
draft-flag: | ||
type: string | ||
default: -draft | ||
secrets: | ||
XCFRAMEWORK_SIGNING_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-14 | ||
timeout-minutes: 30 | ||
steps: | ||
- run: sudo xcode-select --switch /Applications/Xcode_15.1.app | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: brew install ghr | ||
- name: Build Capacitor and Cordova | ||
run: ./build-cap ${{ inputs.release-version }} | ||
- name: Sign Capacitor xcframework | ||
uses: ionic-team/sign-xcframework@main | ||
with: | ||
cert-token: ${{ secrets.XCFRAMEWORK_SIGNING_TOKEN }} | ||
xcframework-path: Capacitor.xcframework | ||
- name: Sign Cordova xcframework | ||
uses: ionic-team/sign-xcframework@main | ||
with: | ||
cert-token: ${{ secrets.XCFRAMEWORK_SIGNING_TOKEN }} | ||
xcframework-path: Cordova.xcframework | ||
- name: Package Capacitor and Cordova | ||
run: ./package-cap ${{ inputs.release-version }} | ||
- name: Push manifest update | ||
uses: EndBug/add-and-commit@v9 | ||
- name: Create Release | ||
run: ghr -token ${{ secrets.GITHUB_TOKEN }} -name ${{ inputs.release-version }} ${{ inputs.draft-flag }} -replace ${{ inputs.release-version }} frameworks |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Dispatch Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release-version: | ||
description: The version to release | ||
required: true | ||
type: string | ||
draft-flag: | ||
description: "Create a Draft Release or Immediately Release" | ||
type: choice | ||
default: -draft | ||
options: | ||
- -draft | ||
- "" | ||
|
||
jobs: | ||
create-release: | ||
uses: ./.github/workflows/build-and-release.yaml | ||
with: | ||
release-version: ${{ inputs.release-version }} | ||
draft-flag: ${{ inputs.draft-flag }} | ||
secrets: inherit |
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
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