Publish installer to Gitea package registry
This commit is contained in:
@@ -41,6 +41,24 @@ jobs:
|
|||||||
cd release
|
cd release
|
||||||
sha256sum Coworker-Setup-*.exe > SHA256SUMS.txt
|
sha256sum Coworker-Setup-*.exe > SHA256SUMS.txt
|
||||||
|
|
||||||
|
- name: Publish installer package
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
run: |
|
||||||
|
test -n "$GITEA_TOKEN"
|
||||||
|
version="$(node -p "require('./package.json').version")"
|
||||||
|
server="${GITHUB_SERVER_URL:-https://git.wilkensxl.de}"
|
||||||
|
owner="${GITHUB_REPOSITORY_OWNER:-Code-Inc}"
|
||||||
|
package_name="coworker-windows-installer"
|
||||||
|
for file in release/Coworker-Setup-*.exe release/SHA256SUMS.txt; do
|
||||||
|
name="$(basename "$file")"
|
||||||
|
curl --fail-with-body -sS \
|
||||||
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
--upload-file "$file" \
|
||||||
|
"$server/api/packages/$owner/generic/$package_name/$version/$name"
|
||||||
|
done
|
||||||
|
|
||||||
- name: Upload installer artifact
|
- name: Upload installer artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -33,7 +33,12 @@ git diff --check
|
|||||||
|
|
||||||
## Windows Installer
|
## Windows Installer
|
||||||
|
|
||||||
The first release artifact is:
|
Download the current Windows installer from the Gitea package registry:
|
||||||
|
|
||||||
|
- [Coworker-Setup-0.1.0.exe](https://git.wilkensxl.de/api/packages/Code-Inc/generic/coworker-windows-installer/0.1.0/Coworker-Setup-0.1.0.exe)
|
||||||
|
- [SHA256SUMS.txt](https://git.wilkensxl.de/api/packages/Code-Inc/generic/coworker-windows-installer/0.1.0/SHA256SUMS.txt)
|
||||||
|
|
||||||
|
The build workflow also keeps the latest installer as an Actions artifact:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
release/Coworker-Setup-<version>.exe
|
release/Coworker-Setup-<version>.exe
|
||||||
|
|||||||
Reference in New Issue
Block a user