-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1247 from godaddy/release-workflows
[cicd] updated release workflows
- Loading branch information
Showing
18 changed files
with
399 additions
and
20 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: '[C#] AppEncryption Release' | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- '[C#] AppEncryption CI' | ||
types: | ||
- completed | ||
branches: | ||
- 'release-*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
release: | ||
if: github.repository == 'godaddy/asherah' && github.event.workflow_run.conclusion == 'success' | ||
name: Release C# AppEncryption | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Fetch all tags | ||
run: git fetch --prune --unshallow --tags | ||
|
||
- name: Cache dotnet packages | ||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | ||
with: | ||
path: ~/.nuget/packages | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('csharp/**/*.csproj') }}-v2 | ||
|
||
- name: Download artifact | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
with: | ||
name: csharp-app-encryption | ||
path: | | ||
${{ github.workspace }}/csharp/AppEncryption/AppEncryption | ||
${{ github.workspace }}/csharp/AppEncryption/Crypto | ||
run-id: ${{ github.event.workflow_run.id }} | ||
|
||
- name: Initialize Envionment Variables | ||
run: | | ||
echo "BASE_VERSION=$(grep -o '<Version>.*<.*>' Directory.Build.props | sed 's/<Version>\(.*\)<.*>/\1/')" >> $GITHUB_ENV | ||
echo "VERSION_SUFFIX=$(echo ${BASE_VERSION} | cut -f2 -d'-')" >> $GITHUB_ENV | ||
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV | ||
- name: Publish C# AppEncryption | ||
if: startsWith('release-', github.env.BRANCH) && github.env.VERSION_SUFFIX != 'alpha' | ||
run: | | ||
./scripts/release_prod.sh | ||
env: | ||
NUGET_KEY: ${{ secrets.NUGET_KEY }} | ||
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }} | ||
working-directory: csharp/AppEncryption |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: '[C#] Logging Release' | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- '[C#] Logging CI' | ||
types: | ||
- completed | ||
branches: | ||
- 'release-*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
release: | ||
if: github.repository == 'godaddy/asherah' && github.event.workflow_run.conclusion == 'success' | ||
name: Release C# Logging | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Fetch all tags | ||
run: git fetch --prune --unshallow --tags | ||
|
||
- name: Cache dotnet packages | ||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | ||
with: | ||
path: ~/.nuget/packages | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('csharp/**/*.csproj') }}-v2 | ||
|
||
- name: Download artifact | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
with: | ||
name: csharp-logging | ||
path: ${{ github.workspace }}/csharp/Logging/Logging | ||
run-id: ${{ github.event.workflow_run.id }} | ||
|
||
- name: Initialize Envionment Variables | ||
run: | | ||
echo "BASE_VERSION=$(grep -o '<Version>.*<.*>' Directory.Build.props | sed 's/<Version>\(.*\)<.*>/\1/')" >> $GITHUB_ENV | ||
echo "VERSION_SUFFIX=$(echo ${BASE_VERSION} | cut -f2 -d'-')" >> $GITHUB_ENV | ||
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV | ||
- name: Publish C# Logging | ||
if: startsWith('release-', github.env.BRANCH) && github.env.VERSION_SUFFIX != 'alpha' | ||
run: | | ||
./scripts/release_prod.sh | ||
env: | ||
NUGET_KEY: ${{ secrets.NUGET_KEY }} | ||
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }} | ||
working-directory: csharp/Logging |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: '[C#] SecureMemory Release' | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- '[C#] SecureMemory CI' | ||
types: | ||
- completed | ||
branches: | ||
- 'release-*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
release: | ||
if: github.repository == 'godaddy/asherah' && github.event.workflow_run.conclusion == 'success' | ||
name: Release C# SecureMemory | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Fetch all tags | ||
run: git fetch --prune --unshallow --tags | ||
|
||
- name: Cache dotnet packages | ||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | ||
with: | ||
path: ~/.nuget/packages | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('csharp/**/*.csproj') }}-v2 | ||
|
||
- name: Download artifact | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
with: | ||
name: csharp-secure-memory | ||
path: | | ||
${{ github.workspace }}/csharp/SecureMemory/SecureMemory | ||
${{ github.workspace }}/csharp/SecureMemory/PlatformNative | ||
run-id: ${{ github.event.workflow_run.id }} | ||
|
||
- name: Initialize Envionment Variables | ||
run: | | ||
echo "BASE_VERSION=$(grep -o '<Version>.*<.*>' Directory.Build.props | sed 's/<Version>\(.*\)<.*>/\1/')" >> $GITHUB_ENV | ||
echo "VERSION_SUFFIX=$(echo ${BASE_VERSION} | cut -f2 -d'-')" >> $GITHUB_ENV | ||
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV | ||
- name: Publish C# SecureMemory | ||
if: startsWith('release-', github.env.BRANCH) && github.env.VERSION_SUFFIX != 'alpha' | ||
run: | | ||
./scripts/release_prod.sh | ||
env: | ||
NUGET_KEY: ${{ secrets.NUGET_KEY }} | ||
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }} | ||
working-directory: csharp/SecureMemory |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: '[Go] AppEncryption Release' | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- '[Go] AppEncryption CI' | ||
types: | ||
- completed | ||
branches: | ||
- 'release-*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Fetch all tags | ||
run: git fetch --prune --unshallow --tags | ||
|
||
- name: Initialize Envionment Variables | ||
run: | | ||
echo "BASE_VERSION=$(cat .versionfile)" >> $GITHUB_ENV | ||
echo "VERSION_SUFFIX=$(echo ${BASE_VERSION} | cut -f2 -d'-')" >> $GITHUB_ENV | ||
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV | ||
- name: Publish Go AppEncryption | ||
if: startsWith('release-', github.env.BRANCH) && github.env.VERSION_SUFFIX != 'alpha' | ||
run: | | ||
./scripts/release_prod.sh | ||
env: | ||
NUGET_KEY: ${{ secrets.NUGET_KEY }} | ||
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }} | ||
working-directory: go/appencryption |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: '[Go] SecureMemory Release' | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- '[Go] SecureMemory CI' | ||
types: | ||
- completed | ||
branches: | ||
- 'release-*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Fetch all tags | ||
run: git fetch --prune --unshallow --tags | ||
|
||
- name: Initialize Envionment Variables | ||
run: | | ||
echo "BASE_VERSION=$(cat .versionfile)" >> $GITHUB_ENV | ||
echo "VERSION_SUFFIX=$(echo ${BASE_VERSION} | cut -f2 -d'-')" >> $GITHUB_ENV | ||
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV | ||
- name: Publish Go SecureMemory | ||
if: startsWith('release-', github.env.BRANCH) && github.env.VERSION_SUFFIX != 'alpha' | ||
run: | | ||
./scripts/release_prod.sh | ||
env: | ||
NUGET_KEY: ${{ secrets.NUGET_KEY }} | ||
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }} | ||
working-directory: go/securememory |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: '[Java] AppEncryption Release' | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- '[Java] AppEncryption CI' | ||
types: | ||
- completed | ||
branches: | ||
- 'release-*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
release: | ||
if: github.repository == 'godaddy/asherah' && github.event.workflow_run.conclusion == 'success' | ||
name: Release Java AppEncryption | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Fetch all tags | ||
run: git fetch --prune --unshallow --tags | ||
|
||
- name: Set up Maven Central Repository | ||
uses: actions/setup-java@ddb82ce8a6ecf5ac3e80c3184839e6661546e4aa | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase | ||
|
||
- name: Initialize Envionment Variables | ||
run: | | ||
echo "BASE_VERSION=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version)" >> $GITHUB_ENV | ||
echo "VERSION_SUFFIX=$(echo ${BASE_VERSION} | cut -f2 -d'-')" >> $GITHUB_ENV | ||
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV | ||
- name: Publish Java AppEncryption | ||
if: startsWith('release-', github.env.BRANCH) && github.env.VERSION_SUFFIX != 'alpha' | ||
run: | | ||
./scripts/release_prod.sh | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
working-directory: java/appencryption |
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.