@@ -106,4 +106,64 @@ jobs:
106106
107107 # Optionally log out
108108 - name : Log out from GitHub Container Registry
109- run : docker logout ghcr.io
109+ run : docker logout ghcr.io
110+
111+ github-release :
112+ runs-on : ubuntu-latest
113+ needs : ci
114+ steps :
115+ - name : Set release version to nightly
116+ run : echo "RELEASE_VERSION=nightly" >> $GITHUB_ENV
117+
118+ - name : Checkout
119+ uses : actions/checkout@v6
120+
121+ - run : |
122+ echo "Before: corepack version => $(corepack --version || echo 'not installed')"
123+ npm install -g corepack@latest
124+ echo "After : corepack version => $(corepack --version)"
125+ corepack enable
126+ pnpm --version
127+
128+ - uses : actions/setup-node@v6
129+ with :
130+ node-version : 22
131+ cache : ' pnpm'
132+
133+ - name : Install dependencies
134+ run : pnpm i --ignore-scripts
135+
136+ - name : Build the app
137+ run : pnpm build
138+
139+ - name : Zip the app
140+ run : zip -r it-tools-${{ env.RELEASE_VERSION }}.zip dist/*
141+
142+ - name : Get changelog
143+ id : changelog
144+ run : |
145+ EOF=$(openssl rand -hex 8)
146+ echo "changelog<<$EOF" >> $GITHUB_OUTPUT
147+ node ./scripts/getLatestChangelog.mjs >> $GITHUB_OUTPUT
148+ echo "$EOF" >> $GITHUB_OUTPUT
149+
150+ - name : Create Release
151+ uses : softprops/action-gh-release@v3
152+ with :
153+ token : ${{ secrets.GITHUB_TOKEN }}
154+ files : it-tools-${{ env.RELEASE_VERSION }}.zip
155+ tag_name : ${{ env.RELEASE_VERSION }}
156+ draft : false
157+ prerelease : true
158+ body : |
159+ ## Docker images
160+
161+ - Docker Hub Registry
162+ - `sharevb/it-tools:${{ env.RELEASE_VERSION}}`
163+
164+ - GitHub Container Registry
165+ - `ghcr.io/sharevb/it-tools:${{ env.RELEASE_VERSION}}`
166+
167+ ## Changelog
168+
169+ ${{ steps.changelog.outputs.changelog }}
0 commit comments