From ef25af5f5de3f1327b14936c6192a80c3cf035a4 Mon Sep 17 00:00:00 2001 From: Sergio Hg Date: Tue, 1 Oct 2019 21:38:55 +0200 Subject: [PATCH] ci(github): migrate release workflow from old syntax (#1492) --- .github/main.workflow | 97 ----------------------------------- .github/workflows/release.yml | 32 ++++++++++++ 2 files changed, 32 insertions(+), 97 deletions(-) delete mode 100644 .github/main.workflow create mode 100644 .github/workflows/release.yml diff --git a/.github/main.workflow b/.github/main.workflow deleted file mode 100644 index d3199e258..000000000 --- a/.github/main.workflow +++ /dev/null @@ -1,97 +0,0 @@ -workflow "Docker && Publish Pre-check" { - resolves = [ - "Docker build health check", - "Test Publish Verdaccio", - ] - on = "push" -} - -action "Docker build health check" { - uses = "actions/docker/cli@8cdf801b322af5f369e00d85e9cf3a7122f49108" - args = "build ." - env = { - VERDACCIO_BUILD_REGISTRY = "https://registry.verdaccio.org" - } -} - -action "Test Publish Verdaccio" { - uses = "verdaccio/github-actions/publish@v0.1.0" - needs = ["Docker build health check"] - args = "-d" -} - -workflow "release" { - resolves = [ - "github-release", - "release:lint", - "release:build", - ] - on = "push" -} - -action "release:tag-filter" { - uses = "actions/bin/filter@master" - args = "tag v*" -} - -action "release:install" { - uses = "docker://node:10" - needs = ["release:tag-filter"] - args = "yarn install --frozen-lockfile" -} - -action "release:build" { - uses = "docker://node:10" - needs = ["release:install"] - args = "yarn run code:build" -} - -action "release:lint" { - uses = "docker://node:10" - needs = ["release:install"] - args = "yarn run lint" -} - -action "release:publish" { - needs = ["release:build"] - uses = "docker://node:10" - args = "sh scripts/publish.sh" - secrets = [ - "REGISTRY_AUTH_TOKEN", - ] - env = { - REGISTRY_URL = "registry.npmjs.org" - } -} - -action "github-release" { - needs = ["release:publish"] - uses = "docker://node:10" - args = "sh scripts/github-release.sh" - secrets = [ - "GITHUB_TOKEN", - ] -} - -action "branch-filter" { - uses = "actions/bin/filter@master" - args = "branch" -} - -action "install" { - needs = ["branch-filter"] - uses = "docker://node:10" - args = "yarn install --frozen-lockfile" -} - -action "build" { - uses = "docker://node:10" - needs = ["install"] - args = "yarn run code:build" -} - -action "lint" { - uses = "docker://node:10" - needs = ["install"] - args = "yarn run lint" -} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..0130f40fd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Use Node (latest) + uses: actions/setup-node@v1 + with: + node_version: 12 + - name: Install + run: yarn install --frozen-lockfile + - name: Build + run: yarn code:build + - name: Lint + run: yarn lint + - name: Publish + run: sh scripts/publish.sh + env: + REGISTRY_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }} + REGISTRY_URL: registry.npmjs.org + - name: Create release notes + run: sh scripts/github-release.sh + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}