Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
7192f5216This file is pinned to the selected release. Download the original to open it in your design tool.
# Whenever we push a v* tag we make a new release.
on:
push:
tags:
- 'v*'
jobs:
export_editor:
runs-on: ubuntu-latest
name: Create Release
steps:
- name: checkout
uses: actions/checkout@v3
# Ensure that you get the entire project history
with:
fetch-depth: 0
- name: get tag from version
id: tag_version
run: |
echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: write version into file
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "## Development Build ##"
replace: ${{steps.tag_version.outputs.TAG_VERSION}}
regex: false
include: AppVersion.cs
- name: setup godot
uses: paulloz/godot-action@v1.2
with:
version: 3.5.1
mono: true
export-templates: true
- name: Install apple codesign
uses: baptiste0928/cargo-install@v2
with:
crate: apple-codesign
- name: export game
run: |
nuget restore
mkdir -p builds/linux
godot --export Linux/X11
mkdir -p builds/osx
godot --export "Mac OSX"
mkdir -p builds/windows
godot --export "Windows Desktop"
godot -s ReplaceIcon.gd Icons/logo0000.ico builds/windows/openscad-graph-editor.exe
- name: Sign and notarize MacOSX
env:
APPLE_DEVELOPER_CERTIFICATE_BASE64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_BASE64 }}
APPLE_DEVELOPER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
APPLE_APPSTORE_API_KEY_BASE64: ${{ secrets.APPLE_APPSTORE_API_KEY_BASE64 }}
run: |
# Decode the certificate into a file
echo $APPLE_DEVELOPER_CERTIFICATE_BASE64 | base64 --decode > certificate.p12
# Put the password into a file
echo $APPLE_DEVELOPER_CERTIFICATE_PASSWORD > certificate_password.txt
# Decode the API key into a file
echo $APPLE_APPSTORE_API_KEY_BASE64 | base64 --decode > api_key.txt
cd builds/osx
# First codesign all libraries
find openscad-graph-editor.app -name "*.dylib" -exec rcodesign sign --p12-file ../../certificate.p12 --p12-password-file ../../certificate_password.txt --code-signature-flags runtime --entitlements-xml-path ../../entitlements.plist {} \;
# Then codesign the bundle
rcodesign sign --p12-file ../../certificate.p12 --p12-password-file ../../certificate_password.txt --code-signature-flags runtime --entitlements-xml-path ../../entitlements.plist openscad-graph-editor.app
# Then send it to Apple for notarization and staple it
rcodesign notary-submit --api-key-path ../../api_key.txt --wait --staple openscad-graph-editor.app
# and rename it so it looks nicer
mv openscad-graph-editor.app "OpenSCAD Graph Editor.app"
- name: Clean secrets
if: always()
run: |
rm -f certificate.p12
rm -f certificate_password.txt
rm -f api_key.txt
- name: zip
run: |
mkdir builds/archives
(cd builds/linux; zip -r ../archives/Linux.zip .)
(cd builds/windows; zip -r ../archives/Windows.zip .)
(cd builds/osx; zip -r ../archives/MacOSX.zip .)
- name: create release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag_version.outputs.TAG_VERSION }}
files: ./builds/archives/*
fail_on_unmatched_files: true
body: See [CHANGES.md](https://github.com/derkork/openscad-graph-editor/blob/master/CHANGES.md) for details.