Skip to content

Commit 8cda27a

Browse files
committed
Use GH releases to trigger publishing
1 parent 8bc47a9 commit 8cda27a

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/main.workflow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
workflow "Release a new version" {
2-
on = "push"
2+
on = "release"
33
resolves = ["publish-on-orbs-registry"]
44
}
55

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,15 @@ workflows:
3737

3838
## Publsh on Orbs Registry
3939

40-
For now, to publish a new version we need to manually change the version in
41-
[entrypoint.sh](https://github.com/nebulab/circleci-orbs-feature-branch-preview/blob/62d846d5fe7d2c56ca8fbd51cb99a2708bc2460b/publish-on-orbs-registry/entrypoint.sh#L7).
40+
To publish a new version it's just needed to [create a new release on this
41+
repository](https://github.com/nebulab/circleci-orbs-feature-branch-preview/releases).
42+
A GitHub action will take care of everything else.
4243

43-
**TODO:**
44-
- Publish only when committing to master
45-
- Find a better way to handle the orb version
44+
**NOTE:** The release tag name should match what CircleCI Orbs Registry expects,
45+
so:
46+
47+
- `1.5.0` :thumbsup:
48+
- `v1.2` :thumbsdown:
4649

4750
## Contributing
4851

publish-on-orbs-registry/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
circleci setup --no-prompt --token $CIRCLECI_TOKEN
55

66
# Publish the orb on CircleCI Orbs Registry
7-
circleci orb publish source.yml nebulab/feature-branch-preview@1.5.0
7+
circleci orb publish source.yml nebulab/feature-branch-preview@$GITHUB_REF

0 commit comments

Comments
 (0)