diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index e97f280d..45f7dfda 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -34,7 +34,7 @@ jobs: run: npm run coverage:clover - name: Report coverage if: always() - uses: slavcodev/coverage-monitor-action@1.1.0 + uses: slavcodev/coverage-monitor-action@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} clover_file: coverage/clover.xml diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml new file mode 100644 index 00000000..1bc1af0f --- /dev/null +++ b/.github/workflows/release-package.yml @@ -0,0 +1,39 @@ +name: Release NPM package + +on: + pull_request: + branches: + - develop + types: [closed] + +jobs: + auto-release: + if: github.event.pull_request.merged == true + name: Automated package release + runs-on: ubuntu-latest + + steps: + - name: Clone the repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 #avoid unrelated history error + token: ${{ secrets.SEMVER_GH_TOKEN }} #bypass branch protection rule + + - name: Configure git user + #configuring git for runner + run: | + git config --global user.name "oat-github-bot" + git config --global user.email "oat-github-bot@taotesting.com" + + - name: Install and apply the release tool + env: + GITHUB_TOKEN: ${{ secrets.SEMVER_GH_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_RELEASE_TOKEN }} + run: | + # setup the place + npm config set //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} + npm i -g @oat-sa/tao-extension-release + # install the package + npm ci + #create tag and release a new version + taoRelease npmRelease --release-branch master --no-interactive diff --git a/package-lock.json b/package-lock.json index 884e765d..559d931d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@oat-sa/tao-item-runner-qti", - "version": "2.0.0", + "version": "2.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@oat-sa/tao-item-runner-qti", - "version": "2.0.0", + "version": "2.0.1", "license": "GPL-2.0", "devDependencies": { "@oat-sa/browserslist-config-tao": "^1.0.1", diff --git a/package.json b/package.json index 87844d9e..3c434a93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@oat-sa/tao-item-runner-qti", - "version": "2.0.0", + "version": "2.0.1", "displayName": "TAO Item Runner QTI", "description": "TAO QTI Item Runner modules", "files": [