Skip to content

Commit a26dc64

Browse files
Albatross prerelease (#122)
* chore: update GH actions for prerelease * chore: update package version * chore: update tag description
1 parent 9370b12 commit a26dc64

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

.github/workflows/onPushToMain.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@ name: version, tag and github release
33

44
on:
55
push:
6-
branches: [main]
6+
branches:
7+
- main
8+
# point at specific branches, or a naming convention via wildcard
9+
- prerelease
10+
tags-ignore:
11+
- '*'
712

813
jobs:
914
release:
1015
uses: salesforcecli/github-workflows/.github/workflows/githubRelease.yml@main
1116
secrets: inherit
17+
with:
18+
prerelease: ${{ github.ref_name != 'main' }}
1219

1320
# most repos won't use this
1421
# depends on previous job to avoid git collisions, not for any functionality reason

.github/workflows/onRelease.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,31 @@ name: publish
22

33
on:
44
release:
5-
types: [released]
6-
# support manual release in case something goes wrong and needs to be repeated or tested
5+
types: [published]
76
workflow_dispatch:
87
inputs:
98
tag:
109
description: tag that needs to publish
1110
type: string
1211
required: true
12+
1313
jobs:
14+
# parses the package.json version and detects prerelease tag (ex: beta from 4.4.4-beta.0)
15+
getDistTag:
16+
outputs:
17+
tag: ${{ steps.distTag.outputs.tag }}
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
with:
22+
ref: ${{ github.event.release.tag_name || inputs.tag }}
23+
- uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main
24+
id: distTag
25+
1426
npm:
1527
uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main
28+
needs: [getDistTag]
1629
with:
17-
ctc: true
18-
sign: true
19-
tag: latest
30+
tag: ${{ needs.getDistTag.outputs.tag || 'latest' }}
2031
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
2132
secrets: inherit

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@salesforce/plugin-devops-center",
33
"description": "The DevOps Center CLI plugin provides a command-line alternative to performing equivalent actions in the DevOps Center graphical UI",
4-
"version": "0.0.1",
4+
"version": "0.1.0-beta.0",
55
"author": "Salesforce",
66
"bugs": "https://github.com/forcedotcom/cli/issues",
77
"dependencies": {

0 commit comments

Comments
 (0)