From 513575982392dae1c716f4579b1b78f92aa25863 Mon Sep 17 00:00:00 2001 From: nowgnas Date: Wed, 10 Jan 2024 12:28:45 +0900 Subject: [PATCH] docs: add release docs --- .github/release.yml | 33 +++++++++++++++++++ .github/workflows/release.yml | 61 +++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 .github/release.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..27152cb --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,33 @@ +name-template: "Payment v$RESOLVED_VERSION" +tag-template: "v$RESOLVED_VERSION" +categories: + - title: "πŸ†• μƒˆλ‘œμš΄ κΈ°λŠ₯이 μΆ”κ°€λ˜μ—ˆμ–΄μš”!" + label: "✨ Feature" + - title: "🐞 μžμž˜ν•œ 버그λ₯Ό μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€." + label: "🐞 Bugfix" + - title: "🫢🏻 μ•± μ‚¬μš©μ„± κ°œμ„ μ— νž˜μΌμŠ΅λ‹ˆλ‹€." + label: "🫢🏻 Improvement" + - title: "πŸ› οΈ 더 λ‚˜μ€ μ½”λ“œλ₯Ό μœ„ν•΄ λ…Έλ ₯ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€." + labels: + - "πŸ”¨ Refactor" + - "βš™οΈ Setting" + - title: "ETC" + labels: + - "*" +change-template: "* $TITLE (#$NUMBER) by @$AUTHOR" +change-title-escapes: '\<*_&#@`' +exclude-labels: + - "Main" +version-resolver: + major: + labels: + - "Major" + minor: + labels: + - "Minor" + patch: + labels: + - "Patch" + default: patch +template: | + $CHANGES diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..798a4be --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,61 @@ +name: Release Tag + +on: + push: + branches: + - main + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5 + with: + config-name: release.yml + env: + GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }} + + deployment: + name: Setup, Build, and Deploy + runs-on: ubuntu-latest + permissions: + packages: write + contents: write + id-token: write + steps: + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + # Set the new tag as a variable + - name: Set New Tag Variable + id: set_new_tag + run: echo "NEW_TAG=${{ steps.tag_version.outputs.new_tag }}" >> $GITHUB_ENV + + - name: Create a GitHub release + uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.tag_version.outputs.new_tag }} + name: Release ${{ steps.tag_version.outputs.new_tag }} + body: ${{ steps.tag_version.outputs.changelog }} + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DEV_DOCKER_ID }} + password: ${{ secrets.DEV_DOCKER_PW }} + + - name: deploy + id: docker_build + uses: docker/build-push-action@v2 + with: + platforms: linux/amd64,linux/arm64 + push: true + tags: nowgnas/bb-payment:${{ steps.tag_version.outputs.new_tag }}, nowgnas/bb-payment:latest