-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (75 loc) · 2.79 KB
/
build-installer.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
name: Release connector
on:
push:
branches: [ main ]
jobs:
common:
uses: ./.github/workflows/common.yml
secrets: inherit
publish-installer:
runs-on: windows-latest
environment: CD
if: ${{ needs.common.outputs.should-release == 0 }}
needs:
- common
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install markdown-pdf
run: npm install -g [email protected]
- name: Convert Markdown to PDF
run: markdown-pdf Documentation.md
- name: download-artifact
uses: actions/download-artifact@v4
with:
name: windows artifacts
path: ./
- name: create release
uses: actions/create-release@v1
id: github-release
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ needs.common.outputs.version }}
release_name: DWSIM Connector ${{ needs.common.outputs.version }}
draft: false
prerelease: true
- name: upload release msi
uses: actions/upload-release-asset@v1
id: github-release-msi
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.github-release.outputs.upload_url }}
asset_path: .\DwsimConnectorInstaller-${{needs.common.outputs.version }}.msi
asset_name: DwsimConnectorInstaller-${{ needs.common.outputs.version }}.msi
asset_content_type: application/octet-stream
- name: upload release binary
uses: actions/upload-release-asset@v1
id: github-release-binary
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.github-release.outputs.upload_url }}
asset_path: .\Service.exe
asset_name: Service.exe
asset_content_type: application/octet-stream
- name: Install publisher
env:
PYPI_ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_READONLY_TOKEN_USER_PUBLIC_REPOS }}
PYPI_ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_READONLY_TOKEN_PUBLIC_REPOS }}
shell: bash
run: pip install cognite-extractor-publisher --extra-index-url "https://${PYPI_ARTIFACTORY_USERNAME}:${PYPI_ARTIFACTORY_PASSWORD}@cognite.jfrog.io/cognite/api/pypi/snakepit/simple"
- name: publish connector
env:
EXTRACTOR_DOWNLOAD_API_ADMIN_SECRET: ${{ secrets.EXTRACTOR_DOWNLOAD_ADMIN_SECRET }}
run: publish-extractor publish --manifest manifest.yml --version ${{ needs.common.outputs.version }}