-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathreReleasePackagesKeepDates.yaml
More file actions
81 lines (70 loc) · 3.04 KB
/
Copy pathreReleasePackagesKeepDates.yaml
File metadata and controls
81 lines (70 loc) · 3.04 KB
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
name: Re-Release Without Release Date Updates
on:
workflow_dispatch:
inputs:
tag_name:
type: string
description: Which release version to repack (type mikroSDK-2.14.2 for example)
default: "mikroSDK-2.14.2"
jobs:
re-release-dont-update-dates:
runs-on: ubuntu-latest
steps:
- name: Authorize Mikroe Actions App
uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.MIKROE_ACTIONS }}
private-key: ${{ secrets.MIKROE_ACTIONS_KEY_AUTHORIZE }}
- name: Checkout code
uses: actions/checkout@v6
with:
token: ${{ steps.app-token.outputs.token }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Cache Python packages
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install aiohttp
pip install aiofiles
pip install requests
pip install py7zr
pip install chardet
pip install alive-progress
pip install elasticsearch==7.13.4
sudo apt-get install p7zip-full
- name: Run Keyword Replacement Script
## Replace keyword 'code' with '_code' (Microchip MCUs)
run: |
python -u scripts/keyword_replace.py "code" "_code" "thirdparty/ethernet/cyclonetcp" "cp1252"
python -u scripts/keyword_replace.py "code" "_code" "thirdparty/lvgl" "cp1252"
- name: Run Package Script
run: python -u scripts/package.py ${{ steps.app-token.outputs.token }} ${{ github.repository }} ${{ github.event.inputs.tag_name }} "False"
- name: Compare Assets with Previous Release
run: python -u scripts/compare_assets.py ${{ steps.app-token.outputs.token }} ${{ github.repository }} "--current_tag" "${{ github.event.inputs.tag_name }}" "--previous_tag" "latest"
- name: Upload result_compare.txt as artifact
uses: actions/upload-artifact@v7
with:
name: result-compare
path: result_compare.txt
## Left commented out for potential future use.
# - name: Run Index Script
# env:
# ES_HOST: ${{ secrets.ES_HOST }}
# ES_USER: ${{ secrets.ES_USER }}
# ES_PASSWORD: ${{ secrets.ES_PASSWORD }}
# MIKROE_NECTO_AWS: ${{ secrets.MIKROE_NECTO_AWS }}
# run: |
# echo "Indexing to Test first."
# python -u scripts/index.py ${{ github.repository }} ${{ steps.app-token.outputs.token }} "latest" ${{ secrets.ES_INDEX_TEST }} "False" "--keep_previous_dates" "True"
# echo "Indexing to Live next."
# python -u scripts/index.py ${{ github.repository }} ${{ steps.app-token.outputs.token }} "latest" ${{ secrets.ES_INDEX_LIVE }} "False" "--keep_previous_dates" "True"