Skip to content

atlasaction: fixed comment icons size on mobile (#111) #54

atlasaction: fixed comment icons size on mobile (#111)

atlasaction: fixed comment icons size on mobile (#111) #54

Workflow file for this run

name: Build and Upload to CDN
on:
workflow_dispatch:
inputs:
commit:
description: 'Commit SHA'
required: false
version:
description: 'Version (should follow semver v1.2.3)'
required: false
push:
branches:
- master
jobs:
test:
uses: ./.github/workflows/ci-go.yaml
secrets: inherit
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
ref: ${{ github.event.inputs.commit || 'master' }}
- name: Setup Go Environment
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Set BINARY_NAME
id: set_binary_name
env:
VERSION: ${{ github.event.inputs.version || 'v1' }}
run: |
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "BINARY_NAME=atlas-action-$VERSION" >> $GITHUB_ENV
- name: Compile Go Binary
run: |
go build -o $BINARY_NAME -ldflags "-X ariga.io/atlas-action/atlasaction.Version=${{ github.event.inputs.version || 'v1' }}" ./cmd/atlas-action
env:
CGO_ENABLED: 0
- name: Install Atlas
uses: ariga/setup-atlas@v0
- name: Check version
run: |
OUTPUT=$(./$BINARY_NAME --version)
[ $(echo $OUTPUT | grep -i "^$VERSION") ] && echo Version=$OUTPUT || (echo "unexpected output: $OUTPUT, expected: $VERSION"; exit 1)
- name: Configure AWS credentials
run: |
aws configure set aws_access_key_id ${{ secrets.RELEASE_AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.RELEASE_AWS_SECRET_ACCESS_KEY }}
- name: Upload binary to S3
env:
AWS_REGION: us-east-1
run: |
aws s3 cp $BINARY_NAME s3://release.ariga.io/atlas-action/$BINARY_NAME