Manual build signed Nudge and upload signed package (prerelease) #127
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
name: Manual build signed Nudge and upload signed package (prerelease) | |
env: | |
NOTARY_APP_PASSWORD: ${{ secrets.NOTARY_APP_PASSWORD_MAOS }} | |
on: [workflow_dispatch] | |
jobs: | |
build: | |
runs-on: macos-13 | |
steps: | |
- name: Checkout nudge repo | |
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 | |
with: | |
fetch-depth: 0 | |
- name: Install Apple Xcode certificates | |
uses: apple-actions/import-codesign-certs@8f3fb608891dd2244cdab3d69cd68c0d37a7fe93 # v2.0.0 | |
with: | |
keychain-password: ${{ github.run_id }} | |
p12-file-base64: ${{ secrets.APP_CERTIFICATES_P12_MAOS }} | |
p12-password: ${{ secrets.APP_CERTIFICATES_P12_PASSWORD_MAOS }} | |
- name: Install Apple Installer certificates | |
uses: apple-actions/import-codesign-certs@8f3fb608891dd2244cdab3d69cd68c0d37a7fe93 # v2.0.0 | |
with: | |
create-keychain: false # do not create a new keychain for this value | |
keychain-password: ${{ github.run_id }} | |
p12-file-base64: ${{ secrets.PKG_CERTIFICATES_P12_MAOS }} | |
p12-password: ${{ secrets.PKG_CERTIFICATES_P12_PASSWORD_MAOS }} | |
- name: Run build package script | |
run: ./build_nudge.zsh "CREATE_PKG" "$NOTARY_APP_PASSWORD" | |
- name: get environment variables | |
id: get_env_var | |
run: | | |
echo "NUDGE_VERSION=$(/bin/cat ./build_info.txt)" >> $GITHUB_ENV | |
echo "NUDGE_MAIN_VERSION=$(/bin/cat ./build_info_main.txt)" >> $GITHUB_ENV | |
- name: Get Changelog Entry | |
id: changelog_reader | |
uses: mindsers/changelog-reader-action@b97ce03a10d9bdbb07beb491c76a5a01d78cd3ef # v2.2.2 | |
with: | |
validation_depth: 100 | |
version: ${{ env.NUDGE_MAIN_VERSION }} | |
- name: Generate changelog | |
id: changelog | |
uses: metcalfc/changelog-generator@afdcb9470aebdb2252c0c95a1c130723c9e21f3a # v4.1 | |
with: | |
myToken: ${{ secrets.GITHUB_TOKEN }} | |
reverse: 'true' | |
- name: Create Pre-Release | |
id: create_pre_release | |
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 | |
with: | |
name: Nudge ${{env.NUDGE_VERSION}} | |
tag_name: v${{env.NUDGE_VERSION}} | |
draft: false | |
prerelease: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
body: | | |
# Notes | |
This is a pre-release version of Nudge created by GitHub Actions. | |
Nudge.app has been signed and notarized. The package has been signed, notarized and stapled. | |
By default Nudge looks for a `com.github.macadmins.Nudge.json` file located in `/Library/Preferences`. If you would like to use an alternative path, please read the [README](https://github.com/macadmins/nudge/blob/main/README.md) or the [WIKI](https://github.com/macadmins/nudge/wiki) | |
## About the LaunchAgent | |
This is a basic launch agent that opens Nudge twice an hour, every 30 minutes. | |
If you would like to reduce the amount of times Nudge launches per day, it is recommended to create your own LaunchAgent. | |
# Changelog | |
${{ steps.changelog_reader.outputs.changes }} | |
# Changes | |
${{ steps.changelog.outputs.changelog }} | |
files: ${{github.workspace}}/outputs/*.pkg | |
- name: Upload packages | |
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
with: | |
name: packages | |
path: outputs/ |