File tree 1 file changed +41
-0
lines changed
1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Create Pre-release
2
+
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ jobs :
7
+ build :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - name : Checkout
11
+ uses : actions/checkout@v4
12
+
13
+ - name : Get package info
14
+ shell : bash
15
+ id : package-info
16
+ run : echo "version=$(python scripts/get_package_version.py)" >> $GITHUB_OUTPUT
17
+
18
+ - name : ' Find Release with tag v${{ steps.package-info.outputs.version}}'
19
+ uses : actions/github-script@v7
20
+ id : release-exists
21
+ env :
22
+ APP_VERSION : ${{ steps.package-info.outputs.version}}
23
+ with :
24
+ script : |
25
+ const releases = await github.rest.repos.listReleases({
26
+ owner: context.repo.owner,
27
+ repo: context.repo.repo
28
+ })
29
+ const tagName = `v${process.env.APP_VERSION}`
30
+ const releaseWithTag = releases.data.find(release => release.tag_name === tagName)
31
+ return releaseWithTag ? 'true' : 'false'
32
+ result-encoding : string
33
+
34
+ - name : Create pre-release
35
+ uses : softprops/action-gh-release@v1
36
+ if : steps.release-exists.outputs.result == 'false'
37
+ with :
38
+ body : ' ## JupyterLab Desktop v${{ steps.package-info.outputs.version}}'
39
+ draft : true
40
+ prerelease : true
41
+ tag_name : ' v${{ steps.package-info.outputs.version}}'
You can’t perform that action at this time.
0 commit comments