Skip to content

Commit

Permalink
Clean up workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
m-dzianishchyts committed Oct 1, 2024
1 parent 0bd47b7 commit f69cdf7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,30 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout...
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python...
- name: Set up Python
uses: actions/setup-python@v5

- name: Install build dependencies...
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'

- name: Install build dependencies
run: pip install build twine

- name: Build...
- name: Build
env:
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_jjava: ${{ github.ref_name }}
run: |
mvn clean verify -U
python -m build
- name: Upload to PyPI...
- name: Upload to PyPI
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
java: [ 11, 17, 21 ]

steps:
- name: Checkout...
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK...
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'

- name: Build and test...
- name: Build and test
run: mvn clean verify -U
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: 'create release'
on:
push:
tags:
- '[0-9]+.[0-9]+*'
- '[0-9]+.[0-9]+.?[ab]?[0-9]+'

permissions:
# allow a write access to GitHub Releases
Expand All @@ -19,27 +19,27 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}

steps:
- name: Checkout...
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK...
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'

- name: Build...
- name: Build
run: mvn clean package

- name: Set version...
- name: Set version
id: vars
run: |
RELEASE_TAG=${GITHUB_REF#refs/*/}
echo "tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT
echo "version=${RELEASE_TAG}" >> $GITHUB_OUTPUT
- name: Create release...
- name: Create release
id: create_release
uses: softprops/action-gh-release@v2
with:
Expand Down

0 comments on commit f69cdf7

Please sign in to comment.