diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000000..f03da2dd51 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish + +on: + push: + branches: + - master + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - name: Install dependencies + run: npm ci + - name: Publish + run: | + VERSION=$(npx semver $(npm view ol@dev version) --increment prerelease --preid dev) + npm --no-git-tag-version version ${VERSION} + npm run build-package + cd build/ol + npm publish --tag dev + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}}