Skip to content

Commit

Permalink
Merge pull request #130 from assimbly/workflows
Browse files Browse the repository at this point in the history
Added new release workflow & deleted old publish action
  • Loading branch information
joaocatalao authored Jun 12, 2023
2 parents 8904c87 + 2595471 commit 1206d8f
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 60 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/new-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: New Release Workflow

on:

release:
types: [ released ]

jobs:

publish_prod_packages:

name: Publish Snapshot Packages
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v3
with:
ref: 'master'

- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'

- name: Update to snapshot version
env:
VERSION: ${{ github.ref_name }}
run: |
echo "Updating to version: ${VERSION}"
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${VERSION}
mvn versions:set-property -Dproperty=assimbly.version -DnewVersion=${VERSION}
- name: Publish package
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish_snapshot_packages:

name: Publish Snapshot Packages
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v3
with:
ref: 'develop'

- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'

- name: Update to snapshot version
env:
SNAPSHOT_VERSION: ${{ github.ref_name }}-SNAPSHOT
run: |
echo "Updating to version: ${SNAPSHOT_VERSION}"
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${SNAPSHOT_VERSION}
mvn versions:set-property -Dproperty=assimbly.version -DnewVersion=${SNAPSHOT_VERSION}
- name: Publish package
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


60 changes: 0 additions & 60 deletions .github/workflows/release-publish.yml

This file was deleted.

0 comments on commit 1206d8f

Please sign in to comment.