diff --git a/.github/workflows/gobuild.yml b/.github/workflows/gobuild.yml index 1b5d5a4..2d83312 100644 --- a/.github/workflows/gobuild.yml +++ b/.github/workflows/gobuild.yml @@ -18,7 +18,9 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-go@v4 with: go-version: "1.20" @@ -35,6 +37,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Setup Go uses: actions/setup-go@v4 with: diff --git a/.github/workflows/gosec.yml b/.github/workflows/gosec.yml index 93e032b..3572753 100644 --- a/.github/workflows/gosec.yml +++ b/.github/workflows/gosec.yml @@ -18,7 +18,9 @@ jobs: GO111MODULE: on steps: - name: Checkout Source - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Run Gosec Security Scanner uses: securego/gosec@master diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..afd7594 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: goreleaser + +on: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - run: git fetch --force --tags + - uses: actions/setup-go@v4 + with: + go-version: stable + - uses: goreleaser/goreleaser-action@v5 + with: + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}