Skip to content

Commit cebb135

Browse files
committed
CI workflow added to autom. release on PIO.
1 parent 1679c29 commit cebb135

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Relase Script
2+
3+
# Controls when the action will run.
4+
on:
5+
release:
6+
# A release, pre-release, or draft of a release is published.
7+
types: [published]
8+
9+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
10+
jobs:
11+
# The introduction just shows some useful informations.
12+
intro:
13+
# The type of runner that the job will run on.
14+
runs-on: ubuntu-latest
15+
# Steps represent a sequence of tasks that will be executed as part of the job.
16+
steps:
17+
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
18+
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}."
19+
20+
publish:
21+
# The type of runner that the job will run on.
22+
runs-on: ubuntu-latest
23+
# Intro must run first
24+
needs: intro
25+
# Steps represent a sequence of tasks that will be executed as part of the job
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Cache pip
31+
uses: actions/cache@v4
32+
with:
33+
path: ~/.cache/pip
34+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
35+
restore-keys: |
36+
${{ runner.os }}-pip-
37+
38+
- name: Cache PlatformIO
39+
uses: actions/cache@v4
40+
with:
41+
path: ~/.platformio
42+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
43+
44+
- name: Set up Python
45+
uses: actions/setup-python@v4
46+
with:
47+
python-version: "3.9"
48+
49+
- name: Install PlatformIO
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install --upgrade platformio
53+
54+
- name: Deploy Package to Registry
55+
env:
56+
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
57+
run: |
58+
platformio package publish --non-interactive

0 commit comments

Comments
 (0)