Skip to content

Commit

Permalink
Fix distribution repo
Browse files Browse the repository at this point in the history
  • Loading branch information
datazuul committed Feb 22, 2022
1 parent e109b79 commit e214c6d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/workflow-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
Expand All @@ -29,11 +30,5 @@ jobs:
java-version: '8'
distribution: 'adopt'
- name: Build with Maven
working-directory: github-actions-java-maven
run: mvn --batch-mode --update-snapshots verify
- name: Upload Maven build artifact
uses: actions/upload-artifact@v2
with:
name: artifact.jar
path: github-actions-java-maven/target/github-actions-java-maven.jar

18 changes: 4 additions & 14 deletions .github/workflows/workflow-release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This workflow will build a Java project with Maven
# For more information see:
# https://rieckpil.de/github-actions-for-java-automate-your-maven-workflows/
# https://blog.codecentric.de/en/2021/02/github-actions-pipeline/
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://docs.github.com/en/actions/publishing-packages/publishing-java-packages-with-maven
Expand Down Expand Up @@ -31,13 +32,7 @@ jobs:
java-version: '8'
distribution: 'adopt'
- name: Build with Maven
working-directory: github-actions-java-maven
run: mvn --batch-mode --update-snapshots verify
- name: Upload Maven build artifact
uses: actions/upload-artifact@v2
with:
name: artifact.jar
path: github-actions-java-maven/target/github-actions-java-maven.jar
run: mvn --batch-mode --update-snapshots install

publish:
needs: build
Expand All @@ -46,18 +41,13 @@ jobs:
contents: read
packages: write
steps:
- name: Download Maven build artifact
working-directory: github-actions-java-maven
uses: actions/download-artifact@v2
with:
name: artifact.jar
path: github-actions-java-maven/target
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Publish package
run: mvn --batch-mode deploy
run: mvn --batch-mode deploy -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/datazuul/iso-639</url>
<url>https://maven.pkg.github.com/datazuul/iso-639-javalib</url>
</repository>
</distributionManagement>
</project>

0 comments on commit e214c6d

Please sign in to comment.