From 5da648d6cd5a469e111ac74ba4d259b6b5b9ab04 Mon Sep 17 00:00:00 2001 From: Eonasdan Date: Fri, 2 Feb 2024 13:52:34 +0000 Subject: [PATCH] release action --- .github/workflows/publish.yml | 5 +++-- .github/workflows/release/action.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release/action.yaml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ac340b7f5..3342e1be8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,11 +11,12 @@ jobs: uses: actions/checkout@v3 - name: Setup uses: ./.github/workflows/base - - name: Build - uses: ./.github/workflows/build + - name: Release + uses: ./.github/workflows/release with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + VERSION: ${{ github.event.release.tag_name }} - name: Deploy Docs uses: peaceiris/actions-gh-pages@v3 with: diff --git a/.github/workflows/release/action.yaml b/.github/workflows/release/action.yaml new file mode 100644 index 000000000..f1d9ebd67 --- /dev/null +++ b/.github/workflows/release/action.yaml @@ -0,0 +1,25 @@ +name: Release +description: Release + +inputs: + GITHUB_TOKEN: + description: 'A Github PAT' + required: true + SONAR_TOKEN: + description: 'A Sonar token' + required: true + VERSION: + description: 'Version number' + required: true + +runs: + using: composite + steps: + - name: Create new release + shell: bash + run: npm run release:version ${{ inputs.VERSION }} + - name: SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ inputs.SONAR_TOKEN }}