diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index bf5b1ae..324085e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,18 +1,19 @@ -name: rke2diff +name: go + on: pull_request: - branches: [ "main" ] + branches: ["main"] jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.22.2' - - name: Build - run: go build -v ./... - - name: Test - run: go test -v ./... + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.22.2" + - name: Build + run: go build -v ./... + - name: Test + run: go test -v ./... diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..63930ba --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,28 @@ +name: goreleaser + +on: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: "~> v2" + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..d22898f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "yaml.schemas": { + "https://goreleaser.com/static/schema.json": "file:///home/mikael/Repos/personal/rke2diff/.github/workflows/goreleaser.yml" + } +} \ No newline at end of file