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 }}