Skip to content

fix: time

fix: time #18

Workflow file for this run

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 '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 DEV 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: Configure PROD AWS credentials
if: ${{ !endsWith(github.ref_name, '-dev') }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.PROD_SECRET_ACCESS_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/
- name: Upload to PROD AWS if not dev tag
if: ${{ !endsWith(github.ref_name, '-dev') }}
run: |
aws s3 cp sls-local-server s3://local-sls-server-runpodinc/
aws s3 cp version.txt s3://local-sls-server-runpodinc/