Merge pull request #288 from kexa-io/dev #1007
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: cicd | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| workflow_dispatch: | |
| permissions: | |
| actions: write | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.head_ref }} # checkout the correct branch name | |
| fetch-depth: 0 | |
| - name: Git Version | |
| id: versioning | |
| uses: codacy/git-version@2.8.0 | |
| with: | |
| release-branch: main | |
| dev-branch: dev | |
| log-paths: Kexa/ | |
| minor-identifier: 'feat:' | |
| major-identifier: 'break:' | |
| - name: Set up version in file | |
| run: echo "${{ steps.versioning.outputs.version }}" > VERSION | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v41 | |
| - name: List all changed files | |
| run: | | |
| echo "## ${{ steps.versioning.outputs.version }}" >> CHANGELOG.md | |
| echo "" >> CHANGELOG.md | |
| echo "### Files added: ${{steps.changed-files.outputs.added_files_count}}" >> CHANGELOG.md | |
| echo "" >> CHANGELOG.md | |
| for file in ${{ steps.changed-files.outputs.added_files }}; do | |
| echo "$file was added" >> CHANGELOG.md | |
| echo "" >> CHANGELOG.md | |
| done | |
| echo "### Files changed: ${{steps.changed-files.outputs.all_changed_and_modified_files_count}}" >> CHANGELOG.md | |
| echo "" >> CHANGELOG.md | |
| for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
| echo "$file was changed" >> CHANGELOG.md | |
| echo "" >> CHANGELOG.md | |
| done | |
| echo "" >> CHANGELOG.md | |
| #- name: install node prune | |
| # run: curl -sf https://gobinaries.com/tj/node-prune | sh | |
| # | |
| #- name: remove useless node files | |
| # run: node-prune | |
| - name: commit changes | |
| uses: EndBug/add-and-commit@v4 | |
| with: | |
| author_name: estebanmathia | |
| author_email: esteban.mathia@supinfo.com | |
| force: false | |
| signoff: false | |
| message: 'add info extract from addon' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: "${{ steps.versioning.outputs.version }}" |