Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# Run locally with act:
#
# act pull_request [--input command=[command]] \
# --platform fusionauth-standard=[ecr-repo-name]/fusionauth-standard:latest] \
# --workflows ./.github/workflows/deploy.yaml \
# --env-file <(aws configure export-credentials --profile [aws-profile] --format env)

---
name: Deploy

on:
Expand All @@ -22,18 +16,37 @@ permissions:

jobs:
deploy:
if: |
github.event_name == 'workflow_dispatch' &&
(inputs.command == 'release' || inputs.command == 'publish')
runs-on: fusionauth-standard
runs-on: ubuntu-latest
defaults:
run:
shell: /usr/bin/bash -l -e -o pipefail {0}
steps:
- name: checkout
uses: actions/checkout@v4

- name: setup java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
java-package: jre

- name: install savant
run: |
curl -O https://repository.savantbuild.org/org/savantbuild/savant-core/2.0.0/savant-2.0.0.tar.gz
tar xzvf savant-2.0.0.tar.gz
savant-2.0.0/bin/sb --version
SAVANT_PATH=$(realpath -s "./savant-2.0.0/bin")
echo "${SAVANT_PATH}" >> $GITHUB_PATH
mkdir -p ~/.savant/plugins
cat << EOF > ~/.savant/plugins/org.savantbuild.plugin.java.properties
21=${JAVA_HOME}
EOF

- name: set aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::752443094709:role/github-actions
role-to-assume: arn:aws:iam::752443094709:role/gha-fusionauth-python-client
role-session-name: aws-auth-action
aws-region: us-west-2

Expand Down Expand Up @@ -67,10 +80,8 @@ jobs:

- name: release to svn
if: inputs.command == 'release'
shell: bash -l {0}
run: sb release

- name: publish to pypi
if: inputs.command == 'publish'
shell: bash -l {0}
run: sb publish