Skip to content

fix: update server download command #66

fix: update server download command

fix: update server download command #66

name: "[release] Plugin build and publish"
on:
workflow_dispatch:
push:
branches:
- 'main'
paths-ignore:
- 'CHANGELOG.md'
# - '.github/*'
concurrency:
# New commit on branch cancels running workflows of the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
BUCKET_NAME: daytona-workspace-tools/daytona/providers/docker-provider
jobs:
binary-build-and-publish:
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
# - uses: wangyoucao577/go-release-action@v1
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# goos: ${{ matrix.goos }}
# goarch: ${{ matrix.goarch }}
# asset_name: core-${{ matrix.goos }}-${{ matrix.goarch }}
# extra_files: LICENSE README.md
# - name: Go Build
# uses: santoshkowshikhr/[email protected]
# with:
# executable_name: daytona-core-${{ matrix.goos }}-${{ matrix.goarch }}
# goos: ${{ matrix.goos }}
# goarch: ${{ matrix.goarch }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Set up private module credentials
run: git config --global url."https://daytonaBot:${{ secrets.GITHUBBOT_TOKEN }}@github.com/daytonaio/daytona".insteadOf "https://github.com/daytonaio/daytona"
- name: Build binaries
run: GOPRIVATE=github.com/daytonaio/daytona GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} CGO_ENABLED=0 go build -o docker-provider-${{ matrix.goos }}-${{ matrix.goarch }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::304794187625:role/gha-daytona-docker-provisioner-plugin
aws-region: us-east-1
- name: Copy binaries to s3
run: |
aws s3 cp docker-provider-* s3://${{ env.BUCKET_NAME }}/latest/