From 0f3578c5a51dff2aebb3647f271b5ae594dd69cf Mon Sep 17 00:00:00 2001 From: Barry Deen Date: Wed, 11 Sep 2024 20:25:10 -0400 Subject: [PATCH] remove docker build, add release --- .github/workflows/docker-build.yml | 36 ----------------------- .github/workflows/release.yml | 46 ++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/docker-build.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml deleted file mode 100644 index 66cb630..0000000 --- a/.github/workflows/docker-build.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Docker Build and Publish - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build-and-publish: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - 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@v4 - with: - context: . - file: ./Dockerfile-optimized - push: ${{ github.event_name != 'pull_request' }} - tags: | - ghcr.io/${{ github.repository }}:latest - ghcr.io/${{ github.repository }}:${{ github.sha }} - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a13505b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +name: build relay for all platforms + +on: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + make-release: + runs-on: ubuntu-latest + steps: + - uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + build-all-for-all: + runs-on: ubuntu-latest + needs: + - make-release + strategy: + matrix: + goos: [linux, freebsd, darwin, windows] + goarch: [amd64, arm64, riscv64] + exclude: + - goarch: arm64 + goos: windows + - goarch: riscv64 + goos: windows + - goarch: riscv64 + goos: darwin + steps: + - uses: actions/checkout@v3 + - uses: wangyoucao577/go-release-action@v1.40 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + overwrite: true + md5sum: false + sha256sum: false + compress_assets: false