-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (57 loc) · 1.84 KB
/
publish-to-release.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
name: Publish to Release
on:
release:
types: [published]
jobs:
build_msi:
runs-on: windows-latest
permissions:
contents: write
strategy:
matrix:
python-version: [3.11]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install pipenv==2023.5.19 setuptools wheel
pipenv install -d --skip-lock --system
- name: Build exe
shell: pwsh
run: |
python setup.py build
mkdir files-to-sign
mv build/exe.win-amd64-${{ matrix.python-version }}/nifcloud.exe files-to-sign
- name: Sign nifcloud.exe
uses: skymatic/code-sign-action@v1
with:
certificate: '${{ secrets.CERTIFICATE }}'
password: '${{ secrets.CERTPASS }}'
certificatesha1: '${{ secrets.CERTHASH }}'
description: 'nifcloud-cli'
timestampUrl: 'http://timestamp.digicert.com'
folder: 'files-to-sign'
- name: Create MSI installer
shell: pwsh
run: |
mv files-to-sign/nifcloud.exe build/exe.win-amd64-${{ matrix.python-version }}/
python setup.py bdist_msi
- name: Sign MSI installer
uses: skymatic/code-sign-action@v1
with:
certificate: '${{ secrets.CERTIFICATE }}'
password: '${{ secrets.CERTPASS }}'
certificatesha1: '${{ secrets.CERTHASH }}'
description: 'nifcloud-cli installer'
timestampUrl: 'http://timestamp.digicert.com'
folder: 'dist'
- name: Upload to release asset
uses: softprops/action-gh-release@v1
with:
files: |
dist/nifcloud-cli-*-win64.msi