From 856640d39f3ae17640e47015d553242c7968b725 Mon Sep 17 00:00:00 2001 From: Dalibor Gogic Date: Thu, 3 Oct 2019 14:24:47 +0200 Subject: [PATCH] Release Workflow (#25) * fix(deps): update dependency guess-webpack to ^0.4.8 * feat: actions initial * chore(deps): bump esm from 3.0.84 to 3.2.25 (#23) Bumps [esm](https://github.com/standard-things/esm) from 3.0.84 to 3.2.25. - [Release notes](https://github.com/standard-things/esm/releases) - [Commits](https://github.com/standard-things/esm/compare/3.0.84...3.2.25) Signed-off-by: dependabot[bot] * fix: pipeline is not valid * lint fixes * workflow badge * fix: repo name * v.1.0.8 * action npm 2fa workaround * fix: could not find expected ':' * use token instead 2fa * publish on pkg github * cannot publish over the previously published versions * tmp disable publishing on gpr * workflow release --- .github/workflows/main.yml | 34 +++-------------------- .github/workflows/release.yml | 51 +++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a88bfa3..720e6c3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,9 @@ name: Module Cross-platform CI -on: [push] - +on: + push: + branches: + - dev jobs: build: runs-on: ${{ matrix.os }} @@ -21,31 +23,3 @@ jobs: npm test env: CI: true - - 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 publish - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://npm.pkg.github.com/ - scope: '@daliborgogic' - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GH_TOKEN}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..638591a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,51 @@ +name: Module Release + +on: [release] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + node-version: [12.x] + steps: + - uses: actions/checkout@v1 + - name: Use Module ${{ matrix.node-version }} on ${{ matrix.os }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install and test + run: | + npm i + npm test + env: + CI: true + + 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 publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + + # publish-gpr: + # needs: build + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v1 + # - uses: actions/setup-node@v1 + # with: + # node-version: 12 + # registry-url: https://npm.pkg.github.com/ + # scope: '@daliborgogic' + # - run: npm publish + # env: + # NODE_AUTH_TOKEN: ${{secrets.GH_TOKEN}}