fix typo #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Release version (e.g., v1.3.0)' | |
| required: true | |
| type: string | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # for creating releases | |
| packages: write # for publishing to GitHub Packages | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Get version from tag or input | |
| id: version | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Update version in pom.xml | |
| run: | | |
| VERSION=${{ steps.version.outputs.version }} | |
| VERSION_NO_V=${VERSION#v} | |
| mvn versions:set -DnewVersion=${VERSION_NO_V} | |
| - name: Run tests | |
| run: mvn clean test | |
| - name: Build and publish to GitHub Packages | |
| run: mvn clean deploy -DskipTests | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Prepare release artifacts | |
| run: | | |
| mkdir -p release-artifacts | |
| cp target/convenia-api-client-*.jar release-artifacts/ | |
| cp README.md release-artifacts/ | |
| cp LICENSE release-artifacts/ | |
| if [ -d "examples" ]; then | |
| cp examples/*.xml release-artifacts/ 2>/dev/null || true | |
| fi | |
| - name: Generate checksums | |
| run: | | |
| cd release-artifacts | |
| for file in *.jar; do | |
| sha256sum "$file" > "$file.sha256" | |
| done | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.version.outputs.version }} | |
| name: Convenia HR API Client ${{ steps.version.outputs.version }} | |
| files: release-artifacts/* | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: false | |
| body: | | |
| ## Convenia HR API Client ${{ steps.version.outputs.version }} | |
| ### Installation | |
| #### Option 1: Download JAR | |
| Download the `convenia-api-client-*.jar` file from the assets below. | |
| #### Option 2: Maven Dependency | |
| Add to your `pom.xml`: | |
| ```xml | |
| <repositories> | |
| <repository> | |
| <id>github</id> | |
| <url>https://maven.pkg.github.com/atricore/convenia-api-java</url> | |
| </repository> | |
| </repositories> | |
| <dependency> | |
| <groupId>com.atricore.iam.convenia.api</groupId> | |
| <artifactId>convenia-api-client</artifactId> | |
| <version>${{ steps.version.outputs.version }}</version> | |
| </dependency> | |
| ``` | |
| Note: GitHub Packages requires authentication. Add your GitHub credentials to `~/.m2/settings.xml`: | |
| ```xml | |
| <servers> | |
| <server> | |
| <id>github</id> | |
| <username>YOUR_GITHUB_USERNAME</username> | |
| <password>YOUR_PERSONAL_ACCESS_TOKEN</password> | |
| </server> | |
| </servers> | |
| ``` | |
| ### Compatibility | |
| - Java 11, 17, 21 | |
| ### Files in this release | |
| - `convenia-api-client-*.jar` - Main connector JAR file | |
| - `README.md` - Documentation | |
| - `LICENSE` - License information | |
| - `*.xml` - Configuration examples (if available) | |
| - `*.sha256` - Checksums for verification | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |