diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..76811d8 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,19 @@ +changelog: + exclude: + labels: + - ignore-for-release + authors: + - octocat + categories: + - title: Breaking Changes 🚨 + labels: + - breaking + - title: New Features 🎉 + labels: + - feature + - title: Fixes 🔧 + labels: + - fix + - title: Other Changes + labels: + - "*" \ No newline at end of file diff --git a/.github/workflows/bumpversion.yml b/.github/workflows/bumpversion.yml index 97400b7..b12255e 100644 --- a/.github/workflows/bumpversion.yml +++ b/.github/workflows/bumpversion.yml @@ -1,5 +1,3 @@ -# This workflow will bump the version of our project once is merged - name: Bump version on: @@ -13,15 +11,22 @@ jobs: runs-on: ubuntu-latest name: "Bump version and create changelog with commitizen" steps: - - name: Check out - uses: actions/checkout@v3 + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.ELEMENTSINTERACTIVE_BOT_APP_ID }} + private-key: ${{ secrets.ELEMENTSINTERACTIVE_BOT_PRIVATE_KEY }} + - uses: actions/checkout@v4 with: fetch-depth: 0 - token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}" + token: ${{ steps.app-token.outputs.token }} + ref: ${{ github.head_ref }} + # Make sure the value of GITHUB_TOKEN will not be persisted in repo's config + persist-credentials: false - id: cz name: Create bump and changelog uses: commitizen-tools/commitizen-action@master with: - github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + github_token: ${{ steps.app-token.outputs.token }} - name: Print Version - run: echo "Bumped to version ${{ steps.cz.outputs.version }}" \ No newline at end of file + run: echo "Bumped to version ${{ steps.cz.outputs.version }}" diff --git a/.github/workflows/conventional-label.yaml b/.github/workflows/conventional-label.yaml new file mode 100644 index 0000000..ea241f2 --- /dev/null +++ b/.github/workflows/conventional-label.yaml @@ -0,0 +1,11 @@ +on: + pull_request_target: + types: [ opened, edited ] +name: conventional-release-labels +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: bcoe/conventional-release-labels@v1 + with: + type_labels: '{"feat": "feature", "fix": "fix", "breaking": "breaking", "ci": "CI"}' \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 648172a..9f1bb0a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,6 +12,16 @@ permissions: contents: write jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + token: "${{ secrets.GITHUB_TOKEN }}" + push_to_pypi: runs-on: ubuntu-latest steps: