diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 0a0d9db955eb..7e5736cc9603 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -48,6 +48,10 @@ jobs: - deleted: [ '*.csl', 'dependent/*.csl', '*.xml' ] workflows: - added|modified: .github/workflows/*.yaml + updated_composer: + - added|modified: composer.json + deleted_composer: + - deleted: composer.json - name: Changed files if: github.event_name == 'push' @@ -87,11 +91,24 @@ jobs: run: cd release && git rm ${{ steps.update.outputs.deleted_files }} if: github.event_name == 'push' && steps.update.outputs.deleted == 'true' + - name: Update composer.json + if: steps.update.outputs.updated_composer == 'true' + run: | + cp composer.json release/composer.json + cd release + git add composer.json + + - name: Delete composer.json + if: steps.update.outputs.deleted_composer == 'true' + run: | + cd release + git rm composer.json + - uses: stefanzweifel/git-auto-commit-action@v4 with: repository: 'release' - commit_message: Releasing ${{ steps.update.outputs.updated_files }} ${{ steps.update.outputs.deleted_files }} - if: github.event_name == 'push' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true') + commit_message: Releasing ${{ steps.update.outputs.updated_files }} ${{ steps.update.outputs.deleted_files }} ${{ steps.update.outputs.updated_composer_files }} ${{ steps.update.outputs.deleted_composer_files }} + if: github.event_name == 'push' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true' || steps.update.outputs.updated_composer == 'true' || steps.update.outputs.deleted_composer == 'true') - uses: stefanzweifel/git-auto-commit-action@v4 with: @@ -116,3 +133,21 @@ jobs: git-user: "csl-bot" git-user-email: github@citationstyles.org git-commit-message: copied ${{ steps.update.outputs.workflows_files }} from styles + + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v5.6 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + default_bump: patch + if: github.event_name == 'push' && hashFiles('composer.json') != '' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true') + + - name: Create a GitHub release + uses: softprops/action-gh-release@v0.1.14 + env: + github_token: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.tag_version.outputs.new_tag }} + name: Release ${{ steps.tag_version.outputs.new_tag }} + body: Released ${{ steps.update.outputs.updated_files }} ${{ steps.update.outputs.deleted_files }} ${{ steps.update.outputs.updated_composer_files }} ${{ steps.update.outputs.deleted_composer_files }} + if: github.event_name == 'push' && hashFiles('composer.json') != '' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true') diff --git a/composer.json b/composer.json new file mode 100644 index 000000000000..7906f93ba752 --- /dev/null +++ b/composer.json @@ -0,0 +1,13 @@ +{ + "name": "citation-style-language/styles", + "description": "Citation Style Language (CSL) Styless", + "type": "library", + "license": "CC-BY-SA-3.0", + "homepage": "http://citationstyles.org/", + "authors": [ + { + "name": "Citation Style Language (CSL) Team", + "homepage": "http://citationstyles.org/about/#Credits" + } + ] +} diff --git a/spec/filters.yaml b/spec/filters.yaml index 7b2c35c49b21..1c4ddb7bab4b 100644 --- a/spec/filters.yaml +++ b/spec/filters.yaml @@ -81,6 +81,7 @@ EXTRA_FILES: - STYLE_DEVELOPMENT.md - STYLE_REQUIREMENTS.md - QUALITY_CONTROL.md +- composer.json # These directories and their contents are ignored when checking for extra files EXTRA_FILES_DIRECTORY: