diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..40585e3 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,21 @@ +name-template: 'release-v$NEXT_PATCH_VERSION' +tag-template: 'release-v$NEXT_PATCH_VERSION' +categories: + - title: 'Features' + labels: + - 'feature' + - 'enhancement' + - title: 'Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - title: 'Maintenance' + labels: + - 'chore' + - 'documentation' +change-template: '- $TITLE (#$NUMBER) @$AUTHOR' +template: | + # Changes + + $CHANGES \ No newline at end of file diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..6a785af --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,17 @@ +name: Release Drafter + +on: + push: + branches: + - master + +jobs: + draft_release: + if: github.repository == 'PasteUs/golang-alpine' + name: Draft release + runs-on: ubuntu-latest + steps: + - uses: toolmantim/release-drafter@v5.2.0 + name: Draft + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/upload-to-release.yml b/.github/workflows/upload-to-release.yml new file mode 100644 index 0000000..5e6dc48 --- /dev/null +++ b/.github/workflows/upload-to-release.yml @@ -0,0 +1,30 @@ +name: Docker Release + +on: + release: + types: [published] + +jobs: + + release: + if: github.repository == 'PasteUs/golang-alpine' + name: Run on ${{ matrix.os }} and push + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + + steps: + - name: Check out code + uses: actions/checkout@v1 + + - name: Publish Docker + uses: LucienShui/Publish-Docker-Github-Action@2.7.1 + with: + name: registry.cn-hangzhou.aliyuncs.com/pasteus/golang-alpine + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + registry: registry.cn-hangzhou.aliyuncs.com + dockerfile: Dockerfile + tag_names: true diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e8bf45b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM golang:1.13-alpine +RUN apk --no-cache add build-base