diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f660109 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,53 @@ +name: Release +on: + release: + types: + - published + +jobs: + release: + timeout-minutes: 10 + + runs-on: ubuntu-latest + + steps: + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: 1.20.x + + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: actions/cache@v3 + with: + path: | + dashboard/.eslintcache + dashboard/node_modules + key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} + + - name: Install Dependencies + run: cd dashboard && npm install + + - name: Build dashboard + run: cd dashboard && npm run build + + - name: Build Binary + run: | + go build + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}