Skip to content

Commit

Permalink
fix release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
schoren committed Feb 8, 2023
1 parent bf03b55 commit 676c9ff
Showing 1 changed file with 2 additions and 71 deletions.
73 changes: 2 additions & 71 deletions .github/workflows/release-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,62 +45,9 @@ jobs:
name: tracetest-web
path: web/build/

prepare-go:
needs: [build-web]
strategy:
matrix:
GOOS: [linux, windows, darwin]
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
GORELEASER_KEY: ${{ secrets.GORELEASER_LICENSE }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: 'go.work'
cache: true
cache-dependency-path: go.work
- shell: bash
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- id: cache
uses: actions/cache@v3
with:
path: dist/${{ matrix.GOOS }}
key: ${{ matrix.GOOS }}-${{ env.sha_short }}
- uses: actions/download-artifact@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
name: tracetest-web
path: web/build/
- uses: goreleaser/goreleaser-action@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
distribution: goreleaser-pro
version: v1.15.0
args: release --clean --split
env:
GOOS: ${{ matrix.GOOS }}
VERSION: ${{ github.ref_name}}
TRACETEST_ENV: main
ANALYTICS_FE_KEY: ${{ secrets.ANALYTICS_FE_KEY }}
ANALYTICS_BE_KEY: ${{ secrets.ANALYTICS_BE_KEY }}

release:
runs-on: ubuntu-latest
needs: [prepare-go, build-web]
needs: [build-web]
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
GORELEASER_KEY: ${{ secrets.GORELEASER_LICENSE }}
Expand All @@ -125,22 +72,6 @@ jobs:
cache: true
cache-dependency-path: go.work

# copy the cashes from prepare
- shell: bash
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
path: dist/linux
key: linux-${{ env.sha_short }}
- uses: actions/cache@v3
with:
path: dist/darwin
key: darwin-${{ env.sha_short }}
- uses: actions/cache@v3
with:
path: dist/windows
key: windows-${{ env.sha_short }}
- uses: actions/download-artifact@v3
with:
name: tracetest-web
Expand All @@ -152,7 +83,7 @@ jobs:
with:
distribution: goreleaser-pro
version: v1.15.0
args: continue --merge
args: release --clean
env:
VERSION: ${{ github.ref_name}}
TRACETEST_ENV: main
Expand Down

0 comments on commit 676c9ff

Please sign in to comment.