-
Notifications
You must be signed in to change notification settings - Fork 191
91 lines (77 loc) · 3.55 KB
/
build_nudge_prerelease_manual.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Manual build signed Nudge and upload signed package (prerelease)
on: [workflow_dispatch]
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout python repo
uses: actions/checkout@v2
- name: Install Apple Xcode certificates
uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071
with:
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
- name: Install Apple Installer certificates
uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071
with:
create-keychain: false # do not create a new keychain for this value
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
p12-file-base64: ${{ secrets.PKG_CERTIFICATES_P12 }}
p12-password: ${{ secrets.PKG_CERTIFICATES_P12_PASSWORD }}
- name: Run build package script
run: ./build_nudge.zsh "CREATE_PKG"
- name: get environment variables
id: get_env_var
run: |
echo "NUDGE_VERSION=$(/bin/cat ./build_info.txt)" >> $GITHUB_ENV
- name: Create Pre-Release
id: create_pre_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v.${{env.NUDGE_VERSION}}
release_name: Nudge ${{env.NUDGE_VERSION}}
body: |
# Notes
This is a pre-release version of Nudge created by GitHub Actions.
Nudge.app has been signed application as well as the package.
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.
draft: false
prerelease: true
- name: Upload Signed Package Pre-Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_pre_release.outputs.upload_url }}
asset_path: ./outputs/Nudge-${{env.NUDGE_VERSION}}.pkg
asset_name: Nudge-${{env.NUDGE_VERSION}}.pkg
asset_content_type: application/x-newton-compatible-pkg
- name: Upload Signed Package Pre-Release Asset (LaunchAgent)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_pre_release.outputs.upload_url }}
asset_path: ./outputs/Nudge_LaunchAgent-1.0.0.pkg
asset_name: Nudge_LaunchAgent-1.0.0.pkg
asset_content_type: application/x-newton-compatible-pkg
- name: Upload Signed Package Pre-Release Asset (Logger)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_pre_release.outputs.upload_url }}
asset_path: ./outputs/Nudge_Logger-1.0.0.pkg
asset_name: Nudge_LaunchLogger-1.0.0.pkg
asset_content_type: application/x-newton-compatible-pkg
- name: Upload packages
uses: actions/upload-artifact@v1
with:
name: packages
path: outputs/