-
Notifications
You must be signed in to change notification settings - Fork 24
47 lines (40 loc) · 1.15 KB
/
releases.yml
File metadata and controls
47 lines (40 loc) · 1.15 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
name: release
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
path: source
submodules: recursive
- name: Remove git information from destination repository
run: |
mkdir dest.git
cp -r source/* dest.git/
cd dest.git
rm -rf .git
rm -rf .gitignore
rm -rf .github
rm -rf .gitmodules
- name: Zip folder and save
run: |
mkdir -p Arduino-PY32
cp -r dest.git/* Arduino-PY32/
zip -r Arduino-PY32-${GITHUB_REF#refs/tags/}.zip Arduino-PY32
- uses: ncipollo/release-action@v1
with:
artifacts: "*.zip"
allowUpdates: true
- name: Send repository_dispatch event to package json
run: |
curl -X POST https://api.github.com/repos/PY32Duino/Arduino-pack-json-ci/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.USER_TOKEN }} \
--data '{"event_type": "release"}'