specifying the branch that this action command going to work at. #7
Workflow file for this run
This file contains 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: Create Release on Tag | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
create_release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: add-new-api-folder-for-the-current-version | |
- name: Set up GitHub CLI | |
uses: sersoft-gmbh/setup-gh-cli-action@v2 | |
with: | |
version: stable | |
- name: Create GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
TAG_NAME=$(git describe --tags) | |
RELEASE_TITLE="Release ${TAG_NAME}" | |
RELEASE_NOTES="See the [CHANGELOG](https://github.com/exoscale/exoscale4j/blob/main/CHANGELOG.md) for details." | |
gh release create "${TAG_NAME}" --title "${RELEASE_TITLE}" --notes "${RELEASE_NOTES}" | |
# Set up JDK 11 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
server-id: 'central' | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.MAVEN_GPG_KEYRING }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Publish package | |
run: mvn --batch-mode deploy --file sdk/pom.xml -Psign-artifacts | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD}} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |