diff --git a/.github/workflows/release-spectral.yml b/.github/workflows/release-spectral.yml new file mode 100644 index 0000000..8ded13a --- /dev/null +++ b/.github/workflows/release-spectral.yml @@ -0,0 +1,24 @@ +name: Releas @rhoas/spectral-ruleset +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '12.x' + registry-url: 'https://registry.npmjs.org' + - name: Change to spectral directory + run: cd spectral + - run: npm install + - name: Set version + run: npm version ${{ github.event.release.tag_name }} + - run: npm publish dist --access=public + env: + NODE_AUTH_TOKEN: ${{ secrets.RHOAS_NPM_TOKEN }} \ No newline at end of file diff --git a/spectral/package.json b/spectral/package.json index 7b9bb98..0af7878 100644 --- a/spectral/package.json +++ b/spectral/package.json @@ -1,6 +1,6 @@ { "name": "@rhoas/spectral-ruleset", - "version": "0.1.2", + "version": "0.0.0", "description": "Spectral ruleset", "private": false, "main": "ruleset.yaml", @@ -44,4 +44,4 @@ "url": "https://github.com/redhat-developer/app-services-api-guidelines/issues" }, "homepage": "https://github.com/redhat-developer/app-services-api-guidelines#readme" -} \ No newline at end of file +}