Skip to content

Commit

Permalink
build: build prereleases
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Dec 2, 2022
1 parent 2f8280f commit e4246c8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/onPushToMain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ name: version, tag and github release

on:
push:
branches: [main]
branches:
- main
- prerelease/*
tags-ignore:
- '*'

jobs:
release:
uses: salesforcecli/github-workflows/.github/workflows/githubRelease.yml@main
secrets: inherit

with:
prerelease: ${{ github.ref_name != 'main' }}
# most repos won't use this
# depends on previous job to avoid git collisions, not for any functionality reason
# docs:
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/onRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: publish

on:
release:
types: [released]
types: [published]
# support manual release in case something goes wrong and needs to be repeated or tested
workflow_dispatch:
inputs:
Expand All @@ -11,9 +11,21 @@ on:
type: string
required: true
jobs:
getDistTag:
outputs:
tag: ${{ steps.distTag.outputs.tag }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name || inputs.tag }}
- uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main
id: distTag

npm:
uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main
needs: [getDistTag]
with:
tag: latest
tag: ${{ needs.getDistTag.outputs.tag || 'latest' }}
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
secrets: inherit

0 comments on commit e4246c8

Please sign in to comment.