Merge pull request #303 from gatewayd-io/fix-plugin-install-on-windows #47
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: Build and release GatewayD | |
on: | |
push: | |
tags: | |
- "v*" | |
permissions: | |
contents: write | |
jobs: | |
build-and-release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go 1.20 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
cache: true | |
- name: Install nfpm for building Linux packages | |
run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest | |
- run: | | |
git config --global url."https://mostafa:${TOKEN}@github.com/".insteadOf "https://github.com" | |
go mod tidy | |
env: | |
TOKEN: ${{ secrets.GH_SDK_TOKEN }} | |
GOPRIVATE: github.com/gatewayd-io/gatewayd-* | |
- name: Build and release binaries | |
run: make build-release | |
- name: Build and release Linux packages | |
run: make build-linux-packages | |
- name: Create release and add artifacts | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/*.tar.gz | |
dist/checksums.txt | |
dist/*.deb | |
dist/*.rpm | |
dist/*.zip | |
draft: false | |
prerelease: false | |
tag_name: ${{ github.ref_name }} | |
name: ${{ github.ref_name }} | |
generate_release_notes: true | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: | | |
ghcr.io/gatewayd-io/gatewayd:${{ github.ref_name }} | |
ghcr.io/gatewayd-io/gatewayd:latest | |
platforms: linux/amd64 |