From 0eb0566cde040e279f3eeaa291222675a2de896d Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Mon, 28 Oct 2019 10:35:40 +0100 Subject: [PATCH] chore(#228): add canary package generator --- .github/workflows/canary.yml | 50 ++++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 24 ++++++++--------- package.json | 1 - 3 files changed, 62 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/canary.yml diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml new file mode 100644 index 0000000..6955cc7 --- /dev/null +++ b/.github/workflows/canary.yml @@ -0,0 +1,50 @@ +name: CI Canary + +on: [pull_request] + +jobs: + build_test_lint: + name: Node Smoke Test Befor Canary + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12.x' + registry-url: 'https://registry.verdaccio.org' + - name: Install + run: yarn install --frozen-lockfile + - name: Lint + run: yarn lint + - name: Build + run: yarn build + - name: Archive production artifacts + uses: actions/upload-artifact@v1 + with: + name: static + path: static + canary: + name: Publish Canary Version of a PR + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Download math result for job 2 + uses: actions/download-artifact@v1 + with: + name: static + - uses: verdaccio/github-actions/canary@v0.4.0 + with: + message: 'Thanks for your PR, the @verdaccio/ui package will be accessible from here for testing purposes:' + is-global: false + package-name: '@verdaccio/ui-theme' + registry: 'https://registry.verdaccio.org' + repo-token: ${{ secrets.GITHUB_TOKEN }} + bot-token: ${{ secrets.VERDACCIO_BOT_TOKEN }} + - uses: actions/setup-node@v1 + with: + node-version: '12.x' + registry-url: 'https://registry.verdaccio.org' + - run: npm publish --tag canary + env: + NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }} + needs: build_test_lint diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index afb121f..99bab14 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,20 +9,20 @@ jobs: strategy: fail-fast: false matrix: - node_version: [10, 12] + node_version: [12, 13] os: [ubuntu-latest, windows-latest, macOS-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node_version }} - - name: Install - run: yarn install --frozen-lockfile - - name: Build - run: yarn build - - name: Lint - run: yarn lint + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node_version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node_version }} + - name: Install + run: yarn install --frozen-lockfile + - name: Lint + run: yarn lint + - name: Build + run: yarn build diff --git a/package.json b/package.json index 6aeba52..0fdcd6b 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,6 @@ "lint:lockfile": "lockfile-lint --path yarn.lock --type yarn --validate-https --allowed-hosts verdaccio npm yarn", "coverage:publish": "codecov", "pre:webpack": "rimraf static/*", - "prepublish": "in-publish && npm run build || not-in-publish", "dev:web": "cross-env BABEL_ENV=ui babel-node tools/dev.server.js", "verdaccio:server": "node tools/verdaccio.js", "build": "npm run pre:webpack && cross-env BABEL_ENV=ui webpack --config tools/webpack.prod.config.babel.js",