From 267140c9e774840801721a11b193e2cad323d156 Mon Sep 17 00:00:00 2001 From: Miguel Ramos Date: Fri, 24 Jun 2022 01:33:00 +0100 Subject: [PATCH] feat: tag artifacts and fix yaml indentation error (#15) Yaml artifact error and on tag all packages are published --- README.md | 4 +++- cmd/action.go | 11 +---------- cmd/templates/workflow-artifact.yaml | 5 +++-- cmd/version.go | 2 +- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 39a4193..bb405a9 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,11 @@ Use "sublime [command] --help" for more information about a command. First let's start to create a workspace monorepo. The creation of the workspace will need some parameters to fullfill package.json needs. ```bash -> sublime workspace --name ws-libs-ui --scope @ws --repo sublime/ws-libs-ui --username miguelramos --email miguel@websublime.dev +> sublime workspace --name ws-libs-ui --scope @websublime --repo sublime/ws-libs-ui --username miguelramos --email miguel@websublime.dev ``` +The scope should be the github organization name, because artifacts will be release to github and able to install it via npm. + | Parameter | Description | |---|---| | --name | This will be the folder name for creating workspace | diff --git a/cmd/action.go b/cmd/action.go index 9843c79..c23ad9b 100644 --- a/cmd/action.go +++ b/cmd/action.go @@ -94,16 +94,7 @@ func getSublimeTagPackages() []core.Packages { pkgs := []core.Packages{} for key := range sublime.Packages { - pkgName := sublime.Packages[key].Name - var output string = "" - - output, _ = utils.GetDiffBetweenTags(sublime.Root) - - founded := strings.Contains(output, pkgName) - - if founded { - pkgs = append(pkgs, sublime.Packages[key]) - } + pkgs = append(pkgs, sublime.Packages[key]) } return pkgs diff --git a/cmd/templates/workflow-artifact.yaml b/cmd/templates/workflow-artifact.yaml index fac7ca0..29962d6 100644 --- a/cmd/templates/workflow-artifact.yaml +++ b/cmd/templates/workflow-artifact.yaml @@ -7,7 +7,7 @@ on: env: CI: true - NODE_ENV: "production" + NODE_ENV: "develop" jobs: artifacts: @@ -29,11 +29,12 @@ jobs: - name: Build run: yarn build - - name: Artifacts + - name: Artifacts env: BUCKET: ${{ secrets.BUCKET }} STORAGE_URL: ${{ secrets.STORAGE_URL }} STORAGE_KEY: ${{ secrets.STORAGE_KEY }} + NODE_ENV: "production" run: | wget https://github.com/websublime/sublime-cli/releases/download/[[ .Version ]]/sublime-[[ .Version ]]-linux-amd64.tar.gz tar -xf sublime-[[ .Version ]]-linux-amd64.tar.gz sublime diff --git a/cmd/version.go b/cmd/version.go index ebb1903..a799454 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -28,7 +28,7 @@ import ( ) var ( - Version string = "v0.0.19" + Version string = "v0.0.20" BuildTime string = "" )