From 0a30734a49cc725ea6aeaccaddd1cb184b15e509 Mon Sep 17 00:00:00 2001 From: Mikael Johansson Date: Mon, 26 Aug 2024 15:02:42 +0200 Subject: [PATCH 1/2] Testing --- .github/workflows/go.yml | 23 ++++++++++++----------- .github/workflows/goreleaser.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/goreleaser.yml 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..0e0044d --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,32 @@ +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: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + # 'latest', 'nightly', or a semver + version: "~> v2" + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution + # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} From 5b449c26691cac9154bbf213e36684612c1241ff Mon Sep 17 00:00:00 2001 From: Mikael Johansson Date: Mon, 26 Aug 2024 15:03:27 +0200 Subject: [PATCH 2/2] Testing --- .github/workflows/goreleaser.yml | 4 ---- .vscode/settings.json | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 0e0044d..63930ba 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -21,12 +21,8 @@ jobs: - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: - # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser - # 'latest', 'nightly', or a semver version: "~> v2" args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution - # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} 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