Skip to content

Commit

Permalink
chore: final test with the entire pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
fdewas-aneo committed Dec 11, 2024
1 parent c1e8e24 commit 8b06610
Showing 1 changed file with 49 additions and 50 deletions.
99 changes: 49 additions & 50 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
name: Release

# permissions:
# contents: write
permissions:
contents: write

on:
pull_request:
pull-request:
branches:
- main
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
# with:
# ref: ${{ github.ref }}
# fetch-depth: 0
versionning:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.snapshot.outputs.version }}
release: ${{ steps.release.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
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: 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: 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@80c816f11db8dea5e3a81025f598193015b51832 # 2.8.0
# with:
# minor-identifier: "feat:"
# release-branch: ${{ github.ref_name }}-pre
# dev-branch: ${{ steps.rev.outputs.current-branch }}
- name: Generate Snapshot Version
id: snapshot
uses: codacy/git-version@80c816f11db8dea5e3a81025f598193015b51832 # 2.8.0
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@80c816f11db8dea5e3a81025f598193015b51832 # 2.8.0
# with:
# minor-identifier: "feat:"
# release-branch: ${{ steps.rev.outputs.current-branch }}
# dev-branch: main
- name: Generate Release Version
id: release
uses: codacy/git-version@80c816f11db8dea5e3a81025f598193015b51832 # 2.8.0
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: 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 }}
- name: Validate tag
run : test ${{ steps.release.outputs.version }} == ${{ github.ref_name }}

# - name: Delete tag if invalid
# if: failure() || cancelled()
# run : git push origin -d ${{ 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
needs:
- versionning
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
Expand All @@ -80,4 +80,3 @@ jobs:
- run: npx @aneoconsultingfr/order-github-release-notes
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 8b06610

Please sign in to comment.