-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some rename and release/ci workflows
- Loading branch information
1 parent
14377b6
commit cc2f3b9
Showing
15 changed files
with
225 additions
and
125 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 |
---|---|---|
@@ -1,32 +1,33 @@ | ||
name: Build barista | ||
name: Build Barista | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
inputs: | ||
save: | ||
description: "Whether to save as an artifact." | ||
default: false | ||
required: false | ||
type: boolean | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout repository | ||
if: matrix.info.container == '' | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Build | ||
run: | | ||
mkdir ./release | ||
xcodebuild -scheme barista -configuration Pre -derivedDataPath "release/DerivedData" -archivePath "release/CodeEdit.xcarchive" -skipPackagePluginValidation archive | ||
mkdir ./build_artifacts | ||
xcodebuild -scheme Barista -derivedDataPath "build_artifacts/DerivedData" -archivePath "build_artifacts/Barista.xcarchive" -skipPackagePluginValidation archive | ||
- name: Save release as artifact | ||
- name: Save build as artifact | ||
if: inputs.save | ||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 | ||
with: | ||
retention-days: 3 | ||
name: release | ||
path: release | ||
name: build_artifacts | ||
path: build_artifacts |
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,14 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test-build: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
save: false |
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,68 @@ | ||
# Builds and releases a .dmg file. | ||
|
||
name: Release Barista | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-release: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
save: true | ||
|
||
upload-release: | ||
name: upload-release | ||
runs-on: ubuntu-latest | ||
needs: [build-release] | ||
steps: | ||
- name: Get build artifacts | ||
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 | ||
with: | ||
pattern: build_artifacts | ||
path: build_artifacts | ||
merge-multiple: true | ||
|
||
- name: Generate dmg | ||
run: | | ||
npm install --global create-dmg | ||
mkdir release | ||
create-dmg "build_artifacts/Barista.app" "release" | ||
- name: Print out all release files | ||
run: | | ||
echo "Generated $(ls ./release | wc -l) files:" | ||
du -h -d 0 ./release/* | ||
- name: Get app version and build number | ||
run: | | ||
APP_VERSION=$(xcrun agvtool mvers -terse1) | ||
APP_BUILD=$(xcrun agvtool vers -terse) | ||
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV | ||
echo "APP_BUILD=$APP_BUILD" >> $GITHUB_ENV | ||
- name: Create release and add release files | ||
uses: softprops/action-gh-release@20e085ccc73308c2c8e43ab8da4f8d7ecbb94d4e # 2.0.1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
prerelease: false | ||
tag_name: ${{ env.APP_VERSION }}-${{env.APP_BUILD}} | ||
draft: true | ||
fail_on_unmatched_files: true | ||
name: ${{ env.APP_VERSION }}-${{env.APP_BUILD}} Release | ||
body: | | ||
<!-- Write summary here --> | ||
--- | ||
## Bug Fixes | ||
## Features | ||
## Changes | ||
## Other | ||
## Internal Changes | ||
files: | | ||
./build/* |
Oops, something went wrong.