diff --git a/.github/workflows/publish-to-aur.yaml b/.github/workflows/publish-to-aur.yaml index b853b62..a7e5a2e 100644 --- a/.github/workflows/publish-to-aur.yaml +++ b/.github/workflows/publish-to-aur.yaml @@ -11,7 +11,10 @@ jobs: publish-to-aur: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: "Publish AUR package" uses: KSXGitHub/github-actions-deploy-aur@v2.2.5 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..0b543b8 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,36 @@ +name: release + +on: + push: + branches: + - main + tags: + - "*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Fetch all tags + run: git fetch --force --tags + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '^1.19' + check-latest: true + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: ${{ env.GITHUB_REF_NAME }} + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }} + \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..ae6f17d --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,31 @@ +builds: + - binary: sema + goos: + - windows + - darwin + - linux + goarch: + - amd64 + - arm64 + env: + - CGO_ENABLED=0 + - GO111MODULES=on + +release: + prerelease: auto + +universal_binaries: + - replace: true + +brews: + - name: sema + homepage: https://github.com/sharpvik/sema + tap: + owner: sharpvik + name: homebrew-sema + commit_author: + name: Viktor A. Rozenko Voitenko + email: sharp.vik@gmail.com + +checksum: + name_template: "checksums.txt"