From 0887720bbe3c55bceb581d349fbb24a29398d83e Mon Sep 17 00:00:00 2001 From: TAKAI Tomonari Date: Sun, 17 Mar 2024 17:28:55 +0900 Subject: [PATCH] =?UTF-8?q?.editorconfig=E3=81=A8.github/workflows?= =?UTF-8?q?=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=82=92=E8=BF=BD=E5=8A=A0=20(#13)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 12 ++++++++++++ .github/workflows/create-tag.yaml | 10 +++------- .github/workflows/production.yaml | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 .editorconfig create mode 100644 .github/workflows/production.yaml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..46cbd27 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_size = 2 +indent_style = space +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.github/workflows/create-tag.yaml b/.github/workflows/create-tag.yaml index f4b8b2e..73ae3be 100644 --- a/.github/workflows/create-tag.yaml +++ b/.github/workflows/create-tag.yaml @@ -1,15 +1,13 @@ name: Creating A Tag on: - pull_request: - types: [closed] + push: branches: - main jobs: constants: runs-on: ubuntu-latest - if: github.event.pull_request.merged == true outputs: TAG_NAME: ${{ steps.set_constants.outputs.tag_name }} steps: @@ -23,10 +21,8 @@ jobs: needs: [constants] steps: - uses: actions/checkout@v4 - - run: | - echo ${{ github.event.pull_request.head.ref }} - echo ${{ github.event.pull_request.merged }} - - run: | + - name: Create tag + run: | echo ${{ needs.constants.outputs.tag_name }} git tag ${{ needs.constants.outputs.tag_name }} git push origin ${{ needs.constants.outputs.tag_name }} diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml new file mode 100644 index 0000000..da4863e --- /dev/null +++ b/.github/workflows/production.yaml @@ -0,0 +1,14 @@ +name: Production Deployment + +on: + release: + types: [published] + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Echo + run: | + echo "Triggering deployment to production"