Skip to content

Commit

Permalink
release action
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyDrane committed Jul 5, 2023
1 parent 8c8ea4b commit 96a1d30
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 106 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/api-release.yml

This file was deleted.

102 changes: 102 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: rAPId Release

on:
release:
types: [released]

jobs:
setup:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Log commit SHA
run: echo $GITHUB_SHA

api-release:
needs:
- setup
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Populate .env with additional vars
run: |
cp ./.github/.github.env .env
echo AWS_ACCOUNT=${{ secrets.AWS_ACCOUNT }} >> .env
echo AWS_REGION=${{ secrets.AWS_REGION }} >> .env
- name: Build API Image
run: make api-create-image

- name: API Tag and Upload Release Image
run: make api-tag-and-upload-release-image

sdk-release:
needs:
- setup
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Populate .env with additional vars
run: |
echo "TWINE_USERNAME=${{ secrets.TWINE_USERNAME_TEST }}" >> .env
echo "TWINE_PASSWORD=${{ secrets.TWINE_PASSWORD_TEST }}" >> .env
echo TWINE_NON_INTERACTIVE=${{ secrets.TWINE_NON_INTERACTIVE }} >> .env
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"

- name: Setup Python Environment
run: |
make sdk-setup
source sdk/.venv/bin/activate
- name: SDK Release
run: make sdk-release

ui-release:
needs:
- setup
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 19

- name: Install UI Packages
run: make ui-setup

- name: UI Build Static Files
run: make ui-create-static-out

- name: UI Zip and Release
env:
TAG: ${{ github.event.release.tag_name }}
run: make ui-zip-and-release tag=$TAG

cleanup:
needs:
- setup
- api-release
- sdk-release
- ui-release
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Clean Docker Context
if: always()
run: make clean-pipeline-docker-context
33 changes: 0 additions & 33 deletions .github/workflows/sdk-release.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/ui-release.yml

This file was deleted.

10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ api-format: ## Run the api code format with black
api-tag-and-upload: ## Tag and upload the latest api image
@cd api/; $(MAKE) tag-and-upload

api-tag-and-upload-release-image:## Tag and upload the api release image
@cd api/; $(MAKE) tag-and-upload-release-image

api-tag-prod-candidate: ## Tag the uploaded api image as a candidate for PROD deployment
@cd api/; $(MAKE) tag-prod-candidate

Expand Down Expand Up @@ -162,7 +165,10 @@ ui-test: ## Test ui site

# UI Release --------------------
##
ui-zip-and-release: ## Zip and release static ui site
@cd ui/; $(MAKE) zip-contents; $(MAKE) upload-to-release
ui-create-static-out:
@cd ui/; $(MAKE) create-static-out

ui-zip-and-release: ## Zip and release prod static ui site
@cd ui/; $(MAKE) zip-contents tag=${tag}; $(MAKE) upload-to-release-prod tag=${tag}

##

0 comments on commit 96a1d30

Please sign in to comment.