fix: Make default images support any components instead of predefined… #52
Workflow file for this run
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: Release | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| tags: | |
| - "[0-9]+.[0-9]+.[0-9]+" | |
| jobs: | |
| versionning: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.snapshot.outputs.version }} | |
| release: ${{ steps.release.outputs.version }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| with: | |
| ref: ${{ github.ref }} | |
| fetch-depth: 0 | |
| - name: Remove tag locally | |
| # This is done so that codacy/git-version can compute the version of the images deployed on docker hub | |
| run: | | |
| git tag -d ${{ github.ref_name }} | |
| - name: Compute branch for codacy | |
| # This is the branch to give to codacy to compute the snapshot version | |
| id: rev | |
| run: | | |
| export CURRENT_BRANCH=$(git describe --tags) | |
| echo "current-branch=$CURRENT_BRANCH" >> $GITHUB_OUTPUT | |
| - name: Generate Snapshot Version | |
| id: snapshot | |
| uses: codacy/git-version@877bb11b7a2ee44dcd7c0a03882c7037356e64e9 # 2.8.6 | |
| with: | |
| minor-identifier: "feat:" | |
| release-branch: ${{ github.ref_name }}-pre | |
| dev-branch: ${{ steps.rev.outputs.current-branch }} | |
| - name: Generate Release Version | |
| id: release | |
| uses: codacy/git-version@877bb11b7a2ee44dcd7c0a03882c7037356e64e9 # 2.8.6 | |
| with: | |
| minor-identifier: "feat:" | |
| release-branch: ${{ steps.rev.outputs.current-branch }} | |
| dev-branch: main | |
| - name: Put versions in step summary | |
| run: | | |
| echo SNAPSHOT => ${{ steps.snapshot.outputs.version }} >> $GITHUB_STEP_SUMMARY | |
| echo RELASE => ${{ steps.release.outputs.version }} >> $GITHUB_STEP_SUMMARY | |
| - name: Validate tag | |
| run : test "${{ steps.release.outputs.version }}" == "${{ github.ref_name }}" -o "${{ vars.OVERRIDE_RELEASE_VERSION }}" == "${{ github.ref_name }}" | |
| - name: Delete tag if invalid | |
| if: failure() || cancelled() | |
| run : git push origin -d ${{ github.ref_name }} | |
| update-changelog: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - versionning | |
| steps: | |
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 18 | |
| - run: npx @aneoconsultingfr/order-github-release-notes | |
| env: | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |