-
Notifications
You must be signed in to change notification settings - Fork 219
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
5f3a506
commit e9fb5fb
Showing
40 changed files
with
1,577 additions
and
215 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,51 @@ | ||
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 | ||
- name: Debug | ||
shell: bash | ||
run: | | ||
echo "artifact-version: ${{ inputs.artifact-version }}" | ||
echo "body: ${{ steps.release-notes.outputs.notes }}" | ||
- uses: rickstaa/action-create-tag@v1 | ||
id: "tag_create" | ||
with: | ||
tag: ${{ inputs.artifact-version }} | ||
tag_exists_error: false | ||
message: "Latest release" |
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,60 @@ | ||
name: Publish build-info to JFrog | ||
description: "Publishes build-info to JFrog" | ||
|
||
inputs: | ||
jfrog-platform-url: | ||
description: "" | ||
required: false | ||
default: https://aerospike.jfrog.io | ||
oidc-provider: | ||
description: "" | ||
required: true | ||
oidc-audience: | ||
description: "" | ||
required: true | ||
build-path: | ||
description: "" | ||
required: true | ||
variables: | ||
description: "" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Debug publish to github | ||
shell: bash | ||
run: | | ||
echo "${{ inputs.jfrog-platform-url }}" | ||
echo "${{ inputs.build-path }}" | ||
- 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 env variables provided with variables | ||
shell: bash | ||
run: | | ||
ENV_VARIABLES='${{ inputs.variables }}' | ||
echo "$ENV_VARIABLES" | jq -r 'to_entries | .[] | "\(.key)=\(.value)"' >> $GITHUB_ENV | ||
- name: Upload artifacts | ||
shell: bash | ||
run: | | ||
BUILD_ID=$(echo "${{ inputs.build-path }}" | sed 's/.*_\(.*\)\/.*/\1/') | ||
BUILD_PATH="promote_${BUILD_ID}" | ||
# record env variables | ||
jf rt bce ${BUILD_PATH} ${{ github.run_number }} | ||
# record git info | ||
jf rt bag ${BUILD_PATH} ${{ github.run_number }} | ||
# publish build info | ||
jf rt bp ${BUILD_PATH} ${{ 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Publish artifacts to github | ||
description: "Publish artifacts to github" | ||
|
||
inputs: | ||
staging-folder: | ||
description: "" | ||
required: false | ||
default: staging | ||
target-folder: | ||
description: "" | ||
required: false | ||
default: github | ||
release-notes: | ||
description: "" | ||
required: true | ||
github-token: | ||
description: "" | ||
required: true | ||
artifact-version: | ||
description: "" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Debug publish to github | ||
shell: bash | ||
run: | | ||
echo "${{ inputs.staging-folder }}" | ||
echo "${{ inputs.target-folder }}" | ||
echo "${{ inputs.artifact-version }}" | ||
echo "${{ inputs.release-notes }}" | ||
- name: Create upload archive for github | ||
id: create-artifact | ||
shell: bash | ||
run: | | ||
src="${{ inputs.staging-folder }}" | ||
dest="${{ inputs.target-folder }}" | ||
find "$src" -type f \ | ||
-exec cp {} "$dest" \; | ||
- id: get-github-release-artifact-names | ||
working-directory: ${{ inputs.target-folder }} | ||
shell: bash | ||
run: | | ||
ARTIFACTS=$(ls -l) | ||
echo "release-artifacts<<EOF" >> $GITHUB_OUTPUT | ||
echo "${ARTIFACTS}" >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
- name: Debug show content of the upload archive | ||
shell: bash | ||
run: | | ||
pwd | ||
ls -laR "${{ inputs.target-folder }}" | ||
- name: Debug GitHub publish input | ||
shell: bash | ||
working-directory: ${{ inputs.target-folder }} | ||
run: | | ||
echo "workind directory: ${{ inputs.target-folder }}" | ||
echo "tag name: Release ${{ inputs.artifact-version }}" | ||
echo "body: Changes for release ${{ inputs.artifact-version }}" | ||
echo "body: ${{ inputs.release-notes }}" | ||
echo "files: ${{ steps.get-github-release-artifact-names.outputs.release-artifacts }}" | ||
#- name: Publish release to github | ||
# working-directory: ${{ inputs.target-folder }} | ||
# uses: softprops/action-gh-release@v2 | ||
# with: | ||
# token: ${{ inputs.github-token }} | ||
# tag_name: Release ${{ inputs.artifact-version }} | ||
# body: | | ||
# Changes for release ${{ inputs.artifact-version }} | ||
# "${{ inputs.release-notes }}" | ||
# draft: false | ||
# prerelease: false | ||
# files: ${{ steps.get-github-release-artifact-names.outputs.release-artifacts }} |
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.