diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 000000000..1a154489f --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,34 @@ +changelog: + categories: + - title: 🚨 Breaking changes + labels: + - backwards-incompatible + - breaking + - title: ✨ New features and enhancements + labels: + - enhancement + - title: 🐞 Fixed bugs + labels: + - bug + - title: ⚠️ Deprecated + labels: + - deprecated + - title: ⛔ Removed + labels: + - removed + - title: 💬 Translations + labels: + - i18n + - title: 📚 Documentation + labels: + - doc + - title: 🏗 Chores + labels: + - chore + - dependency + - dependencies + - security + - dependabot + - title: Other changes + labels: + - '*' diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml deleted file mode 100644 index 7c536d179..000000000 --- a/.github/workflows/changelog.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Generate changelog - -on: - workflow_dispatch: - release: - types: [published] - -jobs: - generate-changelog: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - - name: Checkout wiki repository - uses: actions/checkout@v4.1.1 - with: - repository: c2corg/v6_api.wiki - ref: master - path: wiki - - name: Configure git - run: | - git config --global user.email "action@github.com" - git config --global user.name "GitHub Action" - - name: Generate changelog - id: changelog - uses: c2corg/generate-changelog-action@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - name: Save changelog to file - run: | - echo "$CHANGELOG" > wiki/Changelog.md - env: - CHANGELOG: ${{ steps.changelog.outputs.changelog }} - - name: Commit files - working-directory: wiki - run: | - git config --global user.email "action@github.com" - git config --global user.name "GitHub Action" - git add Changelog.md - git commit -m "Update changelog" - - name: Push changes - uses: ad-m/github-push-action@v0.8.0 - with: - directory: wiki - repository: c2corg/v6_api.wiki - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 000000000..5efbf33f3 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,22 @@ +name: Release + +on: + push: + tags: + - 'v[1-9]+.[0-9]+.[0-9]+' + +jobs: + create-release: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Create or update release + uses: softprops/action-gh-release@v1 + with: + generate_release_notes: true + token: ${{ secrets.GITHUB_TOKEN }}