Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
tisoft committed Oct 24, 2023
1 parent 5a9d101 commit f78900f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
- 'latest'
pull_request:

env:
# needed to access our GitHub Maven repository
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
dependency-resolution:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -61,8 +65,6 @@ jobs:
export JAVA_HOME=$(asdf where java)
export MAVEN_OPTS="-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd'T'HH:mm:ss:SSSZ -Djava.awt.headless=true"
./mvnw clean deploy -DskipTests -Dversioning.disable=false -Dtos.products=false -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
strategy:
Expand Down Expand Up @@ -123,11 +125,19 @@ jobs:
if: github.ref_name == 'main'
run: git push -f origin latest

- name: Delete old release
# Can be replaced with https://github.com/softprops/action-gh-release/pull/188 if that is implemented
uses: liudonghua123/delete-release-action@v1
with:
release_name: 'latest'
suppress_errors: true

- name: Release
if: github.ref_name == 'main' || github.ref_type == 'tag'
uses: softprops/action-gh-release@v1
with:
files: |
**/*.zip
prerelease: ${{ github.ref_type != 'tag' }}
generate_release_notes: true
tag_name: ${{ github.ref_type == 'tag' && github.ref_name || 'latest' }}
12 changes: 12 additions & 0 deletions .mvn/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>github</id>
<url>https://maven.pkg.github.com/${env.GITHUB_REPOSITORY}</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
Expand Down

0 comments on commit f78900f

Please sign in to comment.