diff options
| -rw-r--r-- | .build.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/release.yml | 44 |
2 files changed, 46 insertions, 2 deletions
@@ -22,6 +22,8 @@ tasks: # This is for not having to cd into the <repo> for each task echo 'cd wireguard-gateway-portal' >> ~/.buildenv echo 'export "PATH=/home/build/go/bin:$PATH"' >> ~/.buildenv + - mirror: | + git push --force --mirror [email protected]:a14m/wireguard-gateway-portal.git - deps: | curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin golangci-lint --version @@ -34,5 +36,3 @@ tasks: make lint - build: | make build - - mirror: | - git push --force --mirror [email protected]:a14m/wireguard-gateway-portal.git diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4eefd00 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +--- +name: "Build and Release" +on: + push: + tags: + - v* +permissions: + contents: write +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.25' + - name: Golangci-lint + uses: golangci/[email protected] + - name: Install dependencies + run: make deps + - name: Run lints + run: make lint + - name: Build binaries + run: make build + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: wg-portal-binaries + path: dist/ + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: | + dist/wg-portal-linux-amd64 + dist/wg-portal-linux-arm64 + dist/wg-portal-linux-arm + dist/checksums.txt + generate_release_notes: true + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
