double brances #13
Workflow file for this run
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: Releases | |
on: | |
push: | |
tags: | |
- v*.*.* | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
cache: true | |
- run: go build -ldflags="-X 'sls-local-server/main.Version=${{ github.ref_name }}'" -o sls-local-server main.go | |
name: Build | |
- run: echo ${{github.ref_name}} > version.txt | |
name: Set version file | |
- name: Configure AWS credentials | |
if: endsWith(github.ref_name, '-dev') | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_KEY }} | |
aws-region: us-east-1 | |
- name: Upload to AWS if dev tag | |
if: endsWith(github.ref_name, '-dev') | |
run: | | |
aws s3 cp sls-local-server s3://rutvik-test-script/ | |
aws s3 cp version.txt s3://rutvik-test-script/ |