mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-20 22:52:46 -05:00
ci(github): migrate release workflow from old syntax (#1492)
This commit is contained in:
parent
74fc18fc41
commit
ef25af5f5d
2 changed files with 32 additions and 97 deletions
97
.github/main.workflow
vendored
97
.github/main.workflow
vendored
|
@ -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"
|
||||
}
|
32
.github/workflows/release.yml
vendored
Normal file
32
.github/workflows/release.yml
vendored
Normal file
|
@ -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 }}
|
Loading…
Add table
Reference in a new issue