-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a9f6b4
commit ced7be5
Showing
19 changed files
with
282 additions
and
89 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Create github release | ||
description: Creates a github release | ||
|
||
inputs: | ||
artifact-version: | ||
description: "" | ||
required: true | ||
github-token: | ||
description: | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get previous tag | ||
shell: bash | ||
id: get-prev-tag | ||
run: | | ||
# Fetch all tags | ||
git fetch --tags | ||
echo "previous-tag=$(git tag --sort=-creatordate | sed -n '1p')" >> $GITHUB_OUTPUT | ||
# Extract commit messages between previous tag and the current tag. | ||
- name: Get release notes | ||
shell: bash | ||
id: release-notes | ||
run: | | ||
notes=$(git log "${{steps.get-previous-tag.outputs.previous-tag }}..HEAD" --pretty=format:"%s" --no-merges) | ||
# GitHub Actions requires that multiline output is escaped: | ||
notes="${notes//'%'/'%25'}" | ||
notes="${notes//$'\n'/'%0A'}" | ||
notes="${notes//$'\r'/'%0D'}" | ||
echo "notes=$notes" >> $GITHUB_OUTPUT | ||
# Create a new release using GitHub's built-in action | ||
- name: Create GitHub Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github-token }} | ||
with: | ||
tag_name: ${{ inputs.artifact-version }} | ||
release_name: ${{ inputs.artifact-version }} | ||
body: ${{ steps.release-notes.outputs.notes }} | ||
draft: false | ||
prerelease: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,40 +13,77 @@ inputs: | |
jfrog-platform-url: | ||
description: "" | ||
required: false | ||
default: https://aerospike.jfrog.io/ | ||
default: https://aerospike.jfrog.io | ||
oidc-provider: | ||
description: "" | ||
required: false | ||
default: gh-aerospike-clients | ||
required: true | ||
oidc-audience: | ||
description: "" | ||
required: false | ||
default: aerospike/clients | ||
required: true | ||
crypto-type: | ||
description: "" | ||
required: false | ||
default: gnu | ||
artifact-name: | ||
description: "" | ||
required: true | ||
artifact-id: | ||
description: "" | ||
required: true | ||
artifact-version: | ||
description: "" | ||
required: true | ||
deploy-spec-path: | ||
description: "" | ||
required: false | ||
default: deploy-resources | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up JFrog credentials | ||
id: setup-jfrog-cli | ||
uses: jfrog/setup-jfrog-cli@v4 | ||
env: | ||
JF_URL: ${{ inputs.jfrog-platform-url }} | ||
with: | ||
version: 2.72.2 | ||
oidc-provider-name: ${{ inputs.oidc-provider }} | ||
oidc-audience: ${{ inputs.oidc-audience }} | ||
|
||
- name: Set crypto dependency | ||
- uses: s4u/[email protected] | ||
with: | ||
servers: '[{"id": "jfrog", "username": "${{ steps.setup-jfrog-cli.outputs.oidc-user }}", "password": "${{ steps.setup-jfrog-cli.outputs.oidc-token }}"}]' | ||
|
||
- name: Configure jf cli | ||
shell: bash | ||
run: | | ||
./set_crypto ${{ inputs.crypto-type }} | ||
jf mvn-config \ | ||
--repo-deploy-releases=${{ inputs.jfrog-releases-repo-name }} \ | ||
--repo-deploy-snapshots=${{ inputs.jfrog-snapshots-repo-name }} | ||
- name: Generate deploy spec | ||
shell: bash | ||
working-directory: client | ||
run: | | ||
jq --arg targetPattern "${{ inputs.jfrog-releases-repo-name }}/com/aerospike/${{ inputs.artifact-id }}/${{ inputs.artifact-version }}/" \ | ||
--arg publicPomPattern "deploy-resources/${{ inputs.crypto-type }}_pom.xml" \ | ||
--arg publicPomTarget "${{ inputs.jfrog-releases-repo-name }}/com/aerospike/${{ inputs.artifact-id }}/${{ inputs.artifact-version }}/${{ inputs.artifact-name }}.pom" \ | ||
' | ||
.files[0].target = $targetPattern | | ||
.files[1].pattern = $publicPomPattern | | ||
.files[1].target = $publicPomTarget | ||
' ${{ inputs.deploy-spec-path }}/publish-spec.json.template > ${{ inputs.deploy-spec-path }}/publish-spec.json | ||
- name: Debug deploy spec | ||
shell: bash | ||
working-directory: client | ||
run: | | ||
cat ${{ inputs.deploy-spec-path }}/publish-spec.json | ||
- name: Deploy release | ||
- name: Overwrite default pom with public release pom | ||
shell: bash | ||
working-directory: client | ||
run: | | ||
jf mvn-config --repo-deploy-releases=${{ inputs.jfrog-releases-repo-name }} --repo-deploy-snapshots=${{ inputs.jfrog-snapshots-repo-name }} | ||
jf mvn source:jar javadoc:jar deploy -Dusername=${{ steps.setup-jfrog-cli.outputs.oidc-user }} ${{ steps.setup-jfrog-cli.outputs.oidc-token }} | ||
jf rt bp | ||
jf rt upload --spec=${{ inputs.deploy-spec-path }}/publish-spec.json \ | ||
--build-name=clients-java-push-to-dev \ | ||
--build-number=${{ github.run_number }} |
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
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
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
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
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
Oops, something went wrong.