Skip to content

Commit 860d376

Browse files
authored
Merge pull request #59 from dimitrieh/script-releases
Enable script download tracking for Node-RED Installer Scripts
2 parents 219358a + 37c805a commit 860d376

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.github/workflows/release.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Create Release with Scripts
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version for the release (e.g., v1.0.0)'
11+
required: true
12+
default: 'v1.0.0'
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set version
25+
id: version
26+
run: |
27+
if [ "${{ github.event_name }}" == "push" ]; then
28+
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
29+
else
30+
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
31+
fi
32+
33+
- name: Create release directory
34+
run: mkdir -p release-assets
35+
36+
- name: Copy installer scripts
37+
run: |
38+
cp deb/update-nodejs-and-nodered release-assets/update-nodejs-and-nodered-deb
39+
cp rpm/update-nodejs-and-nodered release-assets/update-nodejs-and-nodered-rpm
40+
chmod +x release-assets/update-nodejs-and-nodered-*
41+
42+
- name: Create release
43+
uses: softprops/action-gh-release@v1
44+
with:
45+
tag_name: ${{ steps.version.outputs.VERSION }}
46+
name: Node-RED Linux Installers ${{ steps.version.outputs.VERSION }}
47+
body: |
48+
Node-RED Linux installer scripts for various distributions.
49+
50+
## Installation
51+
52+
### Debian, Ubuntu, Raspberry Pi OS
53+
```bash
54+
bash <(curl -sL https://github.com/node-red/linux-installers/releases/download/${{ steps.version.outputs.VERSION }}/update-nodejs-and-nodered-deb)
55+
```
56+
57+
### Red Hat, Fedora, CentOS, Oracle Linux
58+
```bash
59+
bash <(curl -sL https://github.com/node-red/linux-installers/releases/download/${{ steps.version.outputs.VERSION }}/update-nodejs-and-nodered-rpm)
60+
```
61+
62+
## Changes
63+
- Updated installer scripts
64+
- See commit history for detailed changes
65+
files: |
66+
release-assets/update-nodejs-and-nodered-deb
67+
release-assets/update-nodejs-and-nodered-rpm
68+
draft: false
69+
prerelease: false

0 commit comments

Comments
 (0)