diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..74be4195 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +--- +name: Generate New Release + +on: + workflow_dispatch: + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: true + persist-credentials: false + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Build + run: | + gem install bundler + git submodule update --init --recursive + bundle install --jobs 4 --retry 3 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 14 + - name: Install Dependencies + run: yarn install --frozen-lockfile + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }} + run: node_modules/.bin/semantic-release diff --git a/.gitignore b/.gitignore index 2e7c7f9a..92d55345 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ /spec/reports/ /gemfiles/*.lock /tmp/ +node_modules .byebug_history spec/.rspec-examples spec/dummy/log/* diff --git a/package.json b/package.json new file mode 100644 index 00000000..6eab3817 --- /dev/null +++ b/package.json @@ -0,0 +1,112 @@ +{ + "name": "graphiti", + "version": "1.4.0", + "repository": { + "type": "git", + "url": "git+https://github.com/jkeen/graphiti.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/graphiti-api/graphiti/issues" + }, + "homepage": "https://graphiti.dev", + "scripts": { + "semantic-release": "semantic-release" + }, + "devDependencies": { + "semantic-release-rubygem": "^1.2.0", + "semantic-release": "^19.0.3", + "@semantic-release/changelog": "^6.0.1", + "@semantic-release/git": "^10.0.1" + }, + "release": { + "branches": [ + "master", + "main", + { + "name": "beta", + "prerelease": true + }, + { + "name": "alpha", + "prerelease": true + } + ], + "plugins": [ + [ + "@semantic-release/commit-analyzer", + { + "releaseRules": [ + { + "type": "*!", + "release": "major" + }, + { + "type": "feat", + "release": "minor" + }, + { + "type": "build", + "release": "patch" + }, + { + "type": "ci", + "release": "patch" + }, + { + "type": "chore", + "release": "patch" + }, + { + "type": "docs", + "release": "patch" + }, + { + "type": "refactor", + "release": "patch" + }, + { + "type": "style", + "release": "patch" + }, + { + "type": "test", + "release": "patch" + } + ], + "parserOpts": { + "noteKeywords": [ + "BREAKING CHANGE", + "BREAKING CHANGES", + "BREAKING", + "BREAKING CHANGE!", + "BREAKING CHANGES!", + "BREAKING!" + ] + } + } + ], + "@semantic-release/release-notes-generator", + [ + "@semantic-release/changelog", + { + "changelogTitle": "graphiti changelog", + "changelogFile": "CHANGELOG.md" + } + ], + "@semantic-release/npm", + "@semantic-release/github", + [ + "@semantic-release/git", + { + "assets": [ + "CHANGELOG.md" + ], + "message": "${nextRelease.version} CHANGELOG [skip ci]\n\n${nextRelease.notes}" + } + ] + ], + "debug": true, + "dryRun": false + } +}