forked from ohmplatform/FreedomGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ohmplatform#37 from ohmplatform/ci/cd
ci/cd added
- Loading branch information
Showing
8 changed files
with
176 additions
and
31 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,122 @@ | ||
name: Package and Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build-macArm: | ||
name: Build (macos-latest) | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
os: [macos-latest] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Use node 18.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "18.x" | ||
- name: Yarn install | ||
run: yarn install | ||
- name: Add MacOS certs | ||
if: matrix.os == 'macos-latest' && startsWith(github.ref, 'refs/tags/') | ||
run: chmod +x add-osx-cert.sh && ./add-osx-cert.sh | ||
env: | ||
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }} | ||
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | ||
- name: Make | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: yarn make-macArm | ||
env: | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} | ||
with: | ||
files: | | ||
**/*.dmg | ||
**/*.zip | ||
build-macIntel: | ||
name: Build (macos-latest) | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
os: [macos-latest] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Use node 18.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "18.x" | ||
- name: Yarn install | ||
run: yarn install | ||
- name: Add MacOS certs | ||
if: matrix.os == 'macos-latest' && startsWith(github.ref, 'refs/tags/') | ||
run: chmod +x add-osx-cert.sh && ./add-osx-cert.sh | ||
env: | ||
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }} | ||
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | ||
- name: Make | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: yarn make-macIntel | ||
env: | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} | ||
with: | ||
files: | | ||
**/*.dmg | ||
**/*.zip | ||
build-windows: | ||
name: Build (windows-latest) | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
os: [windows-latest] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Use node 18.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "18.x" | ||
- name: Yarn install | ||
run: yarn install | ||
- name: Add Windows certificate | ||
if: matrix.os == 'windows-latest' && startsWith(github.ref, 'refs/tags/') | ||
id: write_file | ||
uses: timheuer/base64-to-file@v1 | ||
with: | ||
fileName: "win-certificate.pfx" | ||
encodedString: ${{ secrets.CERTIFICATE_WINDOWS_PFX }} | ||
- name: Make | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: yarn make-win | ||
env: | ||
WINDOWS_PFX_FILE: ${{ steps.write_file.outputs.filePath }} | ||
WINDOWS_PFX_PASSWORD: ${{ secrets.WINDOWS_PFX_PASSWORD }} | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} | ||
with: | ||
files: | | ||
**/*Setup.exe | ||
**/*.nupkg |
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
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,23 @@ | ||
#!/usr/bin/env sh | ||
|
||
KEY_CHAIN=build.keychain | ||
CERTIFICATE_P12=certificate.p12 | ||
|
||
# Recreate the certificate from the secure environment variable | ||
echo $CERTIFICATE_OSX_APPLICATION | base64 --decode > $CERTIFICATE_P12 | ||
|
||
#create a keychain | ||
security create-keychain -p actions $KEY_CHAIN | ||
|
||
# Make the keychain the default so identities are found | ||
security default-keychain -s $KEY_CHAIN | ||
|
||
# Unlock the keychain | ||
security unlock-keychain -p actions $KEY_CHAIN | ||
|
||
security import $CERTIFICATE_P12 -k $KEY_CHAIN -P $CERTIFICATE_PASSWORD -T /usr/bin/codesign; | ||
|
||
security set-key-partition-list -S apple-tool:,apple: -s -k actions $KEY_CHAIN | ||
|
||
# remove certs | ||
rm -fr *.p12 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | ||
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-dyld-environment-variables</key> | ||
<true/> | ||
<key>com.apple.security.cs.disable-executable-page-protection</key> | ||
<true/> | ||
</dict> | ||
</plist> |
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