From ce4458a266cd8509d0645e4e45876fb4b9848f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mich=C3=A9e=20Lengronne?= Date: Thu, 23 Jul 2020 14:27:10 +0200 Subject: [PATCH] The release draft references the correct SHA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michée Lengronne --- .github/workflows/release.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0da6430..4bbf600 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,9 @@ jobs: runs-on: ubuntu-latest name: create release draft steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: 'Get Previous tag' id: previoustag @@ -49,10 +51,10 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} push-branch: 'master' commit-message: 'update inspec.yml and changelog' - force-add: 'true' files: inspec.yml CHANGELOG.md name: dev-sec CI email: hello@dev-sec.io + rebase: 'true' - name: Read CHANGELOG.md id: package @@ -60,9 +62,20 @@ jobs: with: path: ./CHANGELOGRELEASE.md + - uses: actions/checkout@v2 + with: + ref: master + + - name: Get current commitish + id: current_commitish + run: echo "::set-output name=sha::$(git log -1 --format="%H")" + + - name: Check it + run: echo ${{ steps.current_commitish.outputs.sha }} + - name: Create Release draft id: create_release - uses: actions/create-release@v1 + uses: actions/create-release@v1.1.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token with: @@ -70,4 +83,5 @@ jobs: tag_name: ${{ steps.version.outputs.next-version }} body: | ${{ steps.package.outputs.content }} + commitish: ${{ steps.current_commitish.outputs.sha }} draft: true