diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 6ca3677..299061a 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -1,12 +1,22 @@ +name: Create & Publish Release on: push: tags: - 'v*' -name: Create Release - jobs: build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm ci + - run: npm test + + release: + needs: build name: Create Release runs-on: ubuntu-latest steps: @@ -22,3 +32,17 @@ jobs: release_name: ${{ github.ref }} draft: false prerelease: false + + publish-npm: + needs: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index f8bfccf..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Node.js Package - -on: - release: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - - run: npm ci - - run: npm test - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.github/workflows/push-build.yml b/.github/workflows/push-build.yml new file mode 100644 index 0000000..cb03fcb --- /dev/null +++ b/.github/workflows/push-build.yml @@ -0,0 +1,14 @@ +name: Build & Test +on: + push + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm ci + - run: npm test diff --git a/package.json b/package.json index bd6f37c..3bfdb4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spique", - "version": "3.0.4", + "version": "3.0.5", "description": "A spiral deque - high performance and dynamic queue size", "main": "spique.js", "scripts": {