-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (67 loc) · 3.15 KB
/
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
67
68
69
70
71
72
73
74
name: Release extractor
on:
push:
branches: [ master ]
jobs:
common:
uses: ./.github/workflows/common.yml
secrets: inherit
build:
uses: ./.github/workflows/test.yml
secrets: inherit
publish-binaries:
runs-on: ubuntu-latest
needs: common
environment: CD
if: ${{ needs.common.outputs.should-release == 0 }}
steps:
- uses: actions/checkout@v4
- name: Download Linux Artifacts
uses: actions/download-artifact@v4
with:
name: linux-artifacts
path: artifacts/
- name: Download Windows Artifact
uses: actions/download-artifact@v4
with:
name: installer
path: artifacts/
- name: Create tag
uses: rickstaa/action-create-tag@v1
id: "tag_create"
with:
tag: v${{ needs.common.outputs.version }}
tag_exists_error: true
message: Cognite OPC-UA Extractor version ${{ needs.common.outputs.version }}
- name: Upload to github releases
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/opcua-extractor.win-x64.${{ needs.common.outputs.version }}.zip
artifacts/opcua-extractor.linux-x64.${{ needs.common.outputs.version }}.zip
artifacts/mqtt-cdf-bridge.win-x64.${{ needs.common.outputs.version }}.zip
artifacts/mqtt-cdf-bridge.linux-x64.${{ needs.common.outputs.version }}.zip
artifacts/test-server.win-x64.${{ needs.common.outputs.version }}.zip
artifacts/test-server.linux-x64.${{ needs.common.outputs.version }}.zip
artifacts/opcua-extractor-${{ needs.common.outputs.rpmver }}-1.x86_64.rpm
artifacts/opcua-extractor_${{ needs.common.outputs.version }}_amd64.deb
artifacts/OpcUaExtractorSetup-${{ needs.common.outputs.version }}.msi
tag_name: v${{ needs.common.outputs.version }}
name: Release version ${{ needs.common.outputs.version }}
draft: false
prerelease: false
- name: Install python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install extractor uploader
env:
PYPI_ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_READONLY_TOKEN_USER_PUBLIC_REPOS }}
PYPI_ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_READONLY_TOKEN_PUBLIC_REPOS }}
run: |
python -m pip install --upgrade pip
pip install cognite-extractor-publisher --extra-index-url "https://${PYPI_ARTIFACTORY_USERNAME}:${PYPI_ARTIFACTORY_PASSWORD}@cognite.jfrog.io/cognite/api/pypi/snakepit/simple"
- name: Run extractor uploader
env:
EXTRACTOR_DOWNLOAD_API_ADMIN_SECRET: ${{ secrets.EXTRACTOR_DOWNLOAD_ADMIN_SECRET }}
run: publish-extractor publish --manifest manifest.yml --version ${{ needs.common.outputs.version }}