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
name: Publish upgrade artifacts to staging | |
on: | |
push: | |
branches: | |
- test_arm | |
env: | |
INCLUDE_ERTS: false | |
MIX_ENV: prod | |
jobs: | |
publish: | |
# runs-on: arm-runner | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: Install asdf & tools | |
# uses: asdf-vm/actions/install@v2 | |
- name: Setup elixir | |
id: beam | |
uses: erlef/setup-beam@v1 | |
# with: | |
# version-file: .tool-versions | |
# version-type: strict | |
with: | |
otp-version: 25.3.2 # Define the OTP version [required] | |
elixir-version: 1.14.5 # Define the elixir version [required] | |
# gleam-version: 0.32.4 # Define the gleam version [required] | |
# hexpm-mirrors: https://cdn.jsdelivr.net/hex | |
version-type: strict | |
- name: Set up Rust | |
uses: ATiltedTree/setup-rust@v1 | |
with: | |
rust-version: stable | |
- name: Cache Mix | |
uses: actions/cache@v3 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
restore-keys: | | |
${{ runner.os }}-mix- | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Make release | |
run: mix release supavisor | |
- name: Create tarball | |
run: cd _build/prod/rel/ && tar -czvf test_rustler.tar.gz supavisor | |
# run: cd _build/prod/rel/ && tar -czvf ${{ secrets.TARBALL_REGIONS_STAGE }}_supavisor_v$(cat ../../../VERSION)_$(date "+%s").tar.gz supavisor | |
- name: configure aws credentials - staging | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.DEV_AWS_ROLE }} | |
aws-region: "us-east-1" | |
- name: Deploy to S3 | |
shell: bash | |
run: aws s3 sync ./_build/prod/rel/ ${{ secrets.TARBALLS_PATH_STAGE }} --exclude '*' --include '*tar.gz' |