Publish installer to Gitea package registry
This commit is contained in:
@@ -41,6 +41,24 @@ jobs:
|
||||
cd release
|
||||
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
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user