Skip to content

Commit

Permalink
fix(deploy): deploiement de l'artefact dans github registry
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarre committed Nov 5, 2021
1 parent 03560ed commit a227cdf
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
- name: Run semantic release to bump version and create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release --skip-maven-deploy
run: npx semantic-release
19 changes: 19 additions & 0 deletions .github/workflows/maven-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

echo "version = $1"

# Get version number from version tag
JAR_VERSION=`echo $1 | cut -d'v' -f2`
echo "jar = $JAR_VERSION"

# Set new library version in pom.xml using mvn versions:set command
# These new pom.xml and changelog.md generated by @semantic-release/changelog
# will be commit it by @semantic-release/git
mvn versions:set -DnewVersion=$JAR_VERSION &&

# Package the new library version and copy it to release folder
# These files will be upload to github by @semantic-release/github
java -version
mvn -B deploy -DskipTests &&
mkdir release &&
cp target/opt-logging-*.jar release
27 changes: 0 additions & 27 deletions .github/workflows/maven-publish.yml

This file was deleted.

12 changes: 7 additions & 5 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@conveyal/maven-semantic-release",
"@semantic-release/github",
[
"@semantic-release/exec",
{
"prepareCmd": ".github/workflows/maven-deploy.sh ${nextRelease.version}"
}
],
[
"@semantic-release/git",
{
"assets": [
"pom.xml"
],
"assets": ["pom.xml"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
Expand Down

0 comments on commit a227cdf

Please sign in to comment.