diff --git a/.github/workflows/_cd.yml b/.github/workflows/_cd.yml new file mode 100644 index 0000000..f8c9b6c --- /dev/null +++ b/.github/workflows/_cd.yml @@ -0,0 +1,35 @@ +name: Workflow for bumpng semantic version + +on: + workflow_call: + inputs: + working-directory: + type: string + description: directory to run commands + required: true + +jobs: + check: + uses: ./.github/workflows/_check.yml + with: + working-directory: ${{ inputs.working-directory }} + + deploy: + needs: check + runs-on: ubuntu-latest + timeout-minutes: 5 + + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Create pull request with incremented tag + id: run-tagpr + uses: Songmu/tagpr@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + working-directory: ${{ inputs.working-directory }} diff --git a/.github/workflows/cd-core.yml b/.github/workflows/cd-core.yml new file mode 100644 index 0000000..369252e --- /dev/null +++ b/.github/workflows/cd-core.yml @@ -0,0 +1,15 @@ +name: Bump Semantic Version + +on: + push: + branches: + - main + +env: + WORKDIR_CORE: core + +jobs: + cd-core: + uses: ./.github/workflows/_cd.yml + with: + working-directory: ${{ env.WORKDIR_CORE }} diff --git a/core/.tagpr b/core/.tagpr new file mode 100644 index 0000000..46eb4c4 --- /dev/null +++ b/core/.tagpr @@ -0,0 +1,43 @@ +# config file for the tagpr in git config format +# The tagpr generates the initial configuration, which you can rewrite to suit your environment. +# CONFIGURATIONS: +# tagpr.releaseBranch +# Generally, it is "main." It is the branch for releases. The tagpr tracks this branch, +# creates or updates a pull request as a release candidate, or tags when they are merged. +# +# tagpr.versionFile +# Versioning file containing the semantic version needed to be updated at release. +# It will be synchronized with the "git tag". +# Often this is a meta-information file such as gemspec, setup.cfg, package.json, etc. +# Sometimes the source code file, such as version.go or Bar.pm, is used. +# If you do not want to use versioning files but only git tags, specify the "-" string here. +# You can specify multiple version files by comma separated strings. +# +# tagpr.vPrefix +# Flag whether or not v-prefix is added to semver when git tagging. (e.g. v1.2.3 if true) +# This is only a tagging convention, not how it is described in the version file. +# +# tagpr.changelog (Optional) +# Flag whether or not changelog is added or changed during the release. +# +# tagpr.command (Optional) +# Command to change files just before release. +# +# tagpr.template (Optional) +# Pull request template in go template format +# +# tagpr.release (Optional) +# GitHub Release creation behavior after tagging [true, draft, false] +# If this value is not set, the release is to be created. +# +# tagpr.majorLabels (Optional) +# Label of major update targets. Default is [major] +# +# tagpr.minorLabels (Optional) +# Label of minor update targets. Default is [minor] +# +[tagpr] + vPrefix = false + releaseBranch = main + release = false + versionFile = package.json diff --git a/core/package.json b/core/package.json index 022a978..5f4d91f 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "core", - "version": "0.0.0", + "version": "core-0.0.0", "description": "", "type": "module", "scripts": {