Skip to content

Commit cbd43c7

Browse files
committed
Version number input
1 parent 5628f57 commit cbd43c7

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

.github/workflows/release-p5-mode.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: Release p5.js Mode
22
on:
3-
release:
4-
types: [published]
3+
workflow_dispatch:
4+
inputs:
5+
version_number:
6+
description: "What is the revision number?"
7+
required: true
8+
version_pretty:
9+
description: "What is the pretty version name?"
10+
required: true
511

612
jobs:
713
release:
@@ -22,12 +28,19 @@ jobs:
2228
- name: Build with Gradle
2329
run: ./gradlew createPdex createZip
2430

31+
- name: Set Version Number
32+
run: |
33+
VERSION_NUMBER=${{ github.event.inputs.version_number }}
34+
VERSION_PRETTY=${{ github.event.inputs.version_pretty }}
35+
sed -i "s/^version=.*$/version=$VERSION_NUMBER/" p5js/mode/mode.properties
36+
sed -i "s/^prettyVersion=.*$/prettyVersion=$VERSION_PRETTY/" p5js/mode/mode.properties
37+
2538
- name: Upload to Release
2639
uses: svenstaro/upload-release-action@v2
2740
with:
2841
repo_token: ${{ secrets.GITHUB_TOKEN }}
2942
file: p5js/build/p5js.*
30-
tag: ${{ github.ref }}
43+
tag: p5js-v${{ github.event.inputs.version_number }}
3144
file_glob: true
3245
overwrite: true
3346

@@ -37,6 +50,6 @@ jobs:
3750
repo_token: ${{ secrets.GITHUB_TOKEN }}
3851
file: p5js/build/mode/mode.properties
3952
asset_name: p5js.txt
40-
tag: ${{ github.ref }}
53+
tag: p5js-v${{ github.event.inputs.version_number }}
4154
overwrite: true
4255

p5js/library/mode.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name=p5.js Mode
22
category=Unknown
3-
authors=[Processing Foundation](http://processingfoundation.org)
3+
authors=[The Processing Foundation](https://processingfoundation.org/)
44
url=https://github.com/processing/processing-p5.js-mode
55
sentence=P5.js Mode for Processing
66
paragraph=

0 commit comments

Comments
 (0)