-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
2 changed files
with
8 additions
and
190 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,16 +15,16 @@ jobs: | |
strategy: | ||
matrix: | ||
include: | ||
- os: [self-hosted, linux, X64] | ||
target: Linux | ||
# - os: [self-hosted, linux, X64] | ||
# target: Linux | ||
|
||
# M1 | ||
- os: macos-14 | ||
target: Macos | ||
# # M1 | ||
# - os: macos-14 | ||
# target: Macos | ||
|
||
# X86 | ||
- os: macos-13 | ||
target: Macos | ||
# # X86 | ||
# - os: macos-13 | ||
# target: Macos | ||
|
||
- os: windows-latest | ||
target: Windows | ||
|
@@ -220,174 +220,3 @@ jobs: | |
dist/*.sha256sum | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Release choco and brew | ||
|
||
release-brew: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
if: ${{ !cancelled() && success() }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
repository: axonops/homebrew-repository | ||
path: homebrew | ||
persist-credentials: true | ||
fetch-depth: 0 | ||
ssh-key: ${{ secrets.BREW_SSH_KEY }} | ||
|
||
- name: Make changes to Homebrew | ||
run: | | ||
VERSION=$GITHUB_REF_NAME | ||
case $VERSION in | ||
*internal*) | ||
NAME=axonopsworkbench-internal | ||
CONFIG_FILE=Casks/axonopsworkbench-internal.rb | ||
;; | ||
*beta*) | ||
NAME=axonopsworkbench-beta | ||
CONFIG_FILE=Casks/axonopsworkbench-beta.rb | ||
;; | ||
*) | ||
NAME=axonopsworkbench | ||
CONFIG_FILE=Casks/axonopsworkbench.rb | ||
;; | ||
esac | ||
cd homebrew | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
# Get the sha256sum | ||
SHA_ARM=$(curl -sfL ${GITHUB_URL}/${VERSION}/AxonOps.Workbench-${VERSION}-mac-arm64.zip.sha256sum | awk '{print $1}') | ||
SHA_AMD=$(curl -sfL ${GITHUB_URL}/${VERSION}/AxonOps.Workbench-${VERSION}-mac-x64.zip.sha256sum | awk '{print $1}') | ||
# Update versions | ||
cp $TEMPLATE $CONFIG_FILE | ||
sed -i "s/%SHA_ARM%/$SHA_ARM/g" $CONFIG_FILE | ||
sed -i "s/%SHA_AMD%/$SHA_AMD/g" $CONFIG_FILE | ||
sed -i "s/%VERSION%/${VERSION}/g" $CONFIG_FILE | ||
sed -i "s/cask \"axonopsworkbench\" do/cask \"${NAME}\" do/g" $CONFIG_FILE | ||
git add $CONFIG_FILE | ||
if [ $(git status --porcelain | wc -l) -eq "0" ]; then | ||
echo "No changes to commit" | ||
exit 0 | ||
fi | ||
git --no-pager diff | ||
git commit -m "Changes made by GitHub Actions [skip ci]" | ||
git tag $VERSION | ||
env: | ||
GITHUB_URL: https://github.com/axonops/axonops-workbench-cassandra/releases/download/ | ||
TEMPLATE: Casks/axonopsworkbench.rb.tmpl | ||
|
||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
directory: homebrew | ||
repository: axonops/homebrew-repository | ||
ssh: true | ||
tags: true | ||
|
||
release-choco: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
if: ${{ !cancelled() && success() }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
repository: axonops/chocolatey | ||
path: chocolatey | ||
persist-credentials: true | ||
fetch-depth: 0 | ||
ssh-key: ${{ secrets.CHOCO_SSH_KEY }} | ||
|
||
- name: Make changes to chocolatey | ||
run: | | ||
set -x | ||
VERSION=$GITHUB_REF_NAME | ||
cd chocolatey | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
# Get the sha256sum | ||
SHA_AMD=$(curl -sfL ${GITHUB_URL}/${VERSION}/AxonOps.Workbench-${VERSION}-win-x64.exe.sha256sum | awk '{print $1}') | ||
# Update versions | ||
cp $TEMPLATE $CONFIG_FILE | ||
sed -i "s/%SHA_AMD%/$SHA_AMD/g" $CONFIG_FILE | ||
sed -i "s/%VERSION%/${VERSION}/g" $CONFIG_FILE | ||
sed -i "s%<version>.*</version>%<version>${VERSION}</version>%g" axonopsworkbench.nuspec | ||
git add . | ||
if [ $(git status --porcelain | wc -l) -eq "0" ]; then | ||
echo "No changes to commit" | ||
exit 0 | ||
fi | ||
git --no-pager diff | ||
git commit -m "Changes made by GitHub Actions" | ||
git tag $VERSION | ||
env: | ||
GITHUB_URL: https://github.com/axonops/axonops-workbench-cassandra/releases/download/ | ||
TEMPLATE: tools/chocolateyinstall.ps1.tmpl | ||
CONFIG_FILE: tools/chocolateyinstall.ps1 | ||
|
||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
directory: chocolatey | ||
repository: axonops/chocolatey | ||
ssh: true | ||
tags: true | ||
|
||
release-debian-redhat: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
if: ${{ !cancelled() && success() }} | ||
|
||
steps: | ||
- id: "auth" | ||
uses: "google-github-actions/auth@v1" | ||
with: | ||
credentials_json: "${{ secrets.SERVICE_ACCOUNT_KEY }}" | ||
|
||
- name: "Set up Cloud SDK" | ||
uses: "google-github-actions/setup-gcloud@v1" | ||
|
||
- name: "Set runtime variables" | ||
run: | | ||
PUBLISH="yes" | ||
DEBIAN_ARCHS="amd64" | ||
REDHAT_ARCHS="x86_64" | ||
case $VERSION in | ||
*internal*) | ||
PUBLISH="no" | ||
REPO_SUFFIX="-beta" | ||
;; | ||
*beta*) | ||
REPO_SUFFIX="-beta" | ||
;; | ||
*) | ||
REPO_SUFFIX="" | ||
;; | ||
esac | ||
echo "REPO=$REPO" >> $GITHUB_ENV | ||
echo "DEBIAN_ARCHS=$DEBIAN_ARCHS" >> $GITHUB_ENV | ||
echo "REDHAT_ARCHS=$REDHAT_ARCHS" >> $GITHUB_ENV | ||
- name: Push Debian package | ||
if: env.PUBLISH == 'yes' | ||
run: | | ||
for arch in ${{ env.DEBIAN_ARCHS }}; do | ||
curl -sLO "https://github.com/axonops/axonops-workbench-cassandra/releases/download/$GITHUB_REF_NAME/AxonOps.Workbench-$GITHUB_REF_NAME-linux-${arch}.deb" | ||
gcloud config set project axonops-public | ||
gcloud artifacts apt upload axonops-apt-${env.REPO_SUFFIX} --location=europe --source=AxonOps.Workbench-$GITHUB_REF_NAME-linux-${arch}.deb | ||
done | ||
- name: Push RedHat package | ||
if: env.PUBLISH == 'yes' | ||
run: | | ||
for arch in ${{ env.REDHAT_ARCHS }}; do | ||
curl -sLO "https://github.com/axonops/axonops-workbench-cassandra/releases/download/$GITHUB_REF_NAME/AxonOps.Workbench-$GITHUB_REF_NAME-linux-${arch}.rpm" | ||
gcloud config set project axonops-public | ||
gcloud artifacts yum upload axonops-yum-${env.REPO_SUFFIX} --location=europe --source=AxonOps.Workbench-$GITHUB_REF_NAME-linux-${arch}.rpm | ||
done |
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