Skip to content

Commit

Permalink
feat: tag artifacts and fix yaml indentation error (#15)
Browse files Browse the repository at this point in the history
Yaml artifact error and on tag all packages are published
  • Loading branch information
miguelramos authored Jun 24, 2022
1 parent 23ca482 commit 267140c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
11 changes: 1 addition & 10 deletions cmd/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions cmd/templates/workflow-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
CI: true
NODE_ENV: "production"
NODE_ENV: "develop"

jobs:
artifacts:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

var (
Version string = "v0.0.19"
Version string = "v0.0.20"
BuildTime string = ""
)

Expand Down

0 comments on commit 267140c

Please sign in to comment.