From 87bec9c137c97eae9dc5edd8d432c1ce7ef2379f Mon Sep 17 00:00:00 2001 From: fukata Date: Sun, 3 Apr 2022 14:18:08 +0900 Subject: [PATCH] =?UTF-8?q?#4=20release-drafter=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/release-drafter.yml | 60 ++++++++++++++++++++++ .github/workflows/{main.yaml => build.yml} | 11 ++-- .github/workflows/release.yml | 22 ++++++++ README.md | 4 +- 4 files changed, 92 insertions(+), 5 deletions(-) create mode 100644 .github/release-drafter.yml rename .github/workflows/{main.yaml => build.yml} (66%) create mode 100644 .github/workflows/release.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..3de2a1d --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,60 @@ +name-template: 'v$RESOLVED_VERSION 🌈' +tag-template: 'v$RESOLVED_VERSION' +categories: + - title: '🚀 Features' + labels: + - 'feature' + - title: '💪 Enhancement' + labels: + - 'enhancement' + - title: '🐛 Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - title: '🧰 Maintenance' + label: 'chore' + - title: '🔧 Refactoring' + label: 'refactor' + - title: '📖 Documentation' + label: 'documentation' + - title: '⛓️ Dependency update' + label: 'dependencies' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. +version-resolver: + major: + labels: + - 'major' + minor: + labels: + - 'minor' + patch: + labels: + - 'patch' + default: patch +template: | + ## Changes + + $CHANGES +autolabeler: + - label: feature + branch: + - '/^feat(ure)?[/-].+/' + - label: bug + branch: + - '/^fix[/-].+/' + - label: chore + branch: + - '/^chore[/-].+/' + - label: refactor + branch: + - '/(refactor|refactoring)[/-].+/' + - label: documentation + branch: + - '/doc(umentation)[/-].+/' + files: + - '*.md' + - label: enhancement + branch: + - '/(enhancement|improve)[/-].+/' \ No newline at end of file diff --git a/.github/workflows/main.yaml b/.github/workflows/build.yml similarity index 66% rename from .github/workflows/main.yaml rename to .github/workflows/build.yml index b9cd073..786d36f 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/build.yml @@ -1,7 +1,9 @@ -name: Main -on: [push] +on: + push: + tags-ignore: + - 'v*' jobs: - build-only: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -9,4 +11,5 @@ jobs: with: go-version: '1.18.0' - run: go install - - run: go build + - run: go test + - run: go build \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3cb88f8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +on: + push: + tags: + - 'v*' +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: '1.18.0' + - run: go install + - run: go test + - run: go build + - uses: release-drafter/release-drafter@v5 + # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml + # with: + # config-name: my-config.yml + # disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index 6333ef6..165f883 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ Photo data transfer tool. ## Status -[![wercker status](https://app.wercker.com/status/bc0ddbabc6480a220bc99a23d98a5400/s "wercker status")](https://app.wercker.com/project/bykey/bc0ddbabc6480a220bc99a23d98a5400) +![build](https://github.com/github/fukata/ghoto/workflows/build.yml/badge.svg) + +![build](https://github.com/github/fukata/ghoto/workflows/release.yml/badge.svg) ## Requirement