From a1085fed022fa598715160e4188f7d61afef926a Mon Sep 17 00:00:00 2001 From: Kurenai Date: Tue, 19 Oct 2021 03:40:10 +0000 Subject: Create build.yml --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build.yml (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..05c8f4b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build +on: + push: + branches: + - workflow-demo + pull_request: + +jobs: + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.12 + + - name: Check out code + uses: actions/checkout@v1 + + - name: Lint Go Code + run: | + export PATH=$PATH:$(go env GOPATH)/bin # temporary fix. See https://github.com/actions/setup-go/issues/14 + go get -u golang.org/x/lint/golint + make lint + + build: + name: Build + runs-on: ubuntu-latest + needs: [lint] + steps: + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.12 -- cgit v1.2.1 From 4946b6b582de7f34a779b1ccbde33405bca2dc4b Mon Sep 17 00:00:00 2001 From: Kurenai Date: Tue, 19 Oct 2021 03:42:18 +0000 Subject: Update build.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 05c8f4b..a2a001d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ on: push: branches: - workflow-demo + workflow_dispatch: pull_request: jobs: -- cgit v1.2.1 From 56f71cc23567002c1cba030df73827c96c1b8bbd Mon Sep 17 00:00:00 2001 From: Kurenai Date: Tue, 19 Oct 2021 11:37:35 +0800 Subject: Add workflow build config --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build.yml (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a2a001d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build +on: + push: + branches: + - workflow-demo + workflow_dispatch: + pull_request: + +jobs: + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.12 + + - name: Check out code + uses: actions/checkout@v1 + + - name: Lint Go Code + run: | + export PATH=$PATH:$(go env GOPATH)/bin # temporary fix. See https://github.com/actions/setup-go/issues/14 + go get -u golang.org/x/lint/golint + make lint + + build: + name: Build + runs-on: ubuntu-latest + needs: [lint] + steps: + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.12 -- cgit v1.2.1 From bcbfb790858ce9f6afcc3eeaa4f66cfd9dc7f9e7 Mon Sep 17 00:00:00 2001 From: Kurenai Date: Tue, 19 Oct 2021 12:16:43 +0800 Subject: Add workflow release config --- .github/workflows/release.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/release.yml (limited to '.github') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1e89ee8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release +on: + create: + tags: + - v* + workflow_dispatch: + +jobs: + release: + name: Release on GitHub + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v1 + + - name: Validates GO releaser config + uses: docker://goreleaser/goreleaser:latest + with: + args: check + + - name: Create release on GitHub + uses: docker://goreleaser/goreleaser:latest + with: + args: release + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file -- cgit v1.2.1 From 80cb2f9d5e3651c7c87aaef62a33a2f8de18f1e4 Mon Sep 17 00:00:00 2001 From: Kurenai Date: Tue, 19 Oct 2021 04:48:17 +0000 Subject: Update release.yml --- .github/workflows/release.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to '.github') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e89ee8..d1d4dcc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,17 +10,25 @@ jobs: name: Release on GitHub runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v1 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 - - name: Validates GO releaser config - uses: docker://goreleaser/goreleaser:latest + - name: Set up Go + uses: actions/setup-go@v2 with: - args: check + go-version: 1.17 - - name: Create release on GitHub - uses: docker://goreleaser/goreleaser:latest + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 with: - args: release + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + version: latest + args: release --rm-dist + workdir: mkvtool env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution + # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} -- cgit v1.2.1