Skip to content

Commit

Permalink
extend release for other arch (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
cc-shekher authored Dec 4, 2024
1 parent 64b028b commit c08c611
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,45 @@ name: Release starchitect provider
on:
push:
tags:
- 'v*.*.*' # Trigger this workflow on versioned tags
- 'v*.*.*'

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # Required for creating releases

strategy:
matrix:
goos: [darwin, linux]
goarch: [amd64, arm64]

steps:
# Step 1: Check out the repository
- name: Check out the repository
uses: actions/checkout@v2

# Step 2: Set up Go
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22'

# Step 3: Build the binary or artifact
- name: Build the binary
run: go build -o terraform-provider-starchitect .

# Step 4: Archive the artifact
- name: Archive the binary
run: zip release.zip terraform-provider-starchitect
- name: Build binary for ${{ matrix.goos }}_${{ matrix.goarch }}
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
BINARY_NAME=terraform-provider-starchitect
# Build the binary
go build -o ${BINARY_NAME} .
# Create zip file with OS and architecture in name
zip terraform-provider-starchitect_${{ matrix.goos }}_${{ matrix.goarch }}.zip ${BINARY_NAME}
# Step 5: Create the GitHub release and upload the artifact
- name: Create GitHub Release and upload artifact
- name: Create GitHub Release and upload artifacts
uses: softprops/action-gh-release@v1
with:
files: release.zip
files: terraform-provider-starchitect_*_*.zip
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

0 comments on commit c08c611

Please sign in to comment.