Update .forgejo/workflows/release.yml
This commit is contained in:
parent
74341f28e7
commit
a223d77e93
1 changed files with 25 additions and 2 deletions
|
@ -84,8 +84,8 @@ jobs:
|
|||
echo "Disk usage:"
|
||||
du -sh ~/.m2/repository || echo "No .m2 directory found"
|
||||
echo " "
|
||||
echo "BUILD Outputs ************************* "
|
||||
mvn clean package -Pprod -DskipTests -Dmaven.download.parallel=false -Dmaven.repo.local=/root/.m2/repository -s .forgejo/workflows/ci-settings.xml
|
||||
echo "BUILD Outputs ************************* (without clean in : mvn clean package ...) "
|
||||
mvn package -Pprod -DskipTests -Dmaven.download.parallel=false -Dmaven.repo.local=/root/.m2/repository -s .forgejo/workflows/ci-settings.xml
|
||||
container:
|
||||
image: maven:3.9-eclipse-temurin-17
|
||||
volumes:
|
||||
|
@ -103,6 +103,29 @@ jobs:
|
|||
name: app-backend
|
||||
path: target/resilient*.jar
|
||||
|
||||
# auto-create a release
|
||||
- name: Create release and upload JAR to Forgejo
|
||||
run: |
|
||||
# Install Forgejo CLI
|
||||
curl -sSL https://codeberg.org/forgejo/forgejo-cli/releases/latest/download/forgejo-linux-amd64 -o /usr/local/bin/forgejo
|
||||
chmod +x /usr/local/bin/forgejo
|
||||
|
||||
# Configure Forgejo CLI with token
|
||||
forgejo config --host https://git.oguerreiro.com --token "${{ secrets.FORGEJO_TOKEN }}"
|
||||
|
||||
# Extract version
|
||||
VERSION="${{ steps.version.outputs.release_version }}"
|
||||
|
||||
# Create the release
|
||||
forgejo release create "v$VERSION" \
|
||||
--title "Release $VERSION" \
|
||||
--notes "Automated release created by CI" \
|
||||
--repo root/resilient
|
||||
|
||||
# Upload the JAR artifact
|
||||
forgejo release upload "v$VERSION" target/resilient*.jar \
|
||||
--repo oguerreiro/resilient
|
||||
|
||||
# ##################################################################
|
||||
# ## THIS IS A RELEASE - Change master version to next SNAPSHOT ##
|
||||
# ## #4. Checkout master ##
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue