From c4e6ab72b8d80904e131d63480defd3d581875f3 Mon Sep 17 00:00:00 2001 From: Woojoong Kim Date: Sun, 30 Jun 2024 17:50:50 -0700 Subject: [PATCH] github action version check fix (#20) * github action version check fix Signed-off-by: Woojoong Kim * github action version check fix Signed-off-by: Woojoong Kim --------- Signed-off-by: Woojoong Kim --- .github/workflows/code-scan.yml | 2 ++ .github/workflows/release.yml | 16 ++++++++++++++++ VERSION | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code-scan.yml b/.github/workflows/code-scan.yml index ccf05ed..4a3ca29 100644 --- a/.github/workflows/code-scan.yml +++ b/.github/workflows/code-scan.yml @@ -16,6 +16,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: check version run: make check-version lint: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94d93e7..d1d127e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,6 +49,22 @@ jobs: with: fetch-depth: 0 - name: create release using REST API + run: | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.GH_ONOS_PAT }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/${{ github.repository }}/releases \ + -d '{ + "tag_name": "v${{ needs.version-check.outputs.target_version }}", + "target_commitish": "${{ github.event.repository.default_branch }}", + "name": "v${{ needs.version-check.outputs.target_version }}", + "draft": false, + "prerelease": false, + "generate_release_notes": true + }' + - name: create release using REST API with go prefix for api run: | curl -L \ -X POST \ diff --git a/VERSION b/VERSION index f69d83a..5a5831a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.7-dev +0.0.7