Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
chore: update github workflows [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Sep 20, 2023
1 parent c13d1c8 commit 6cbab76
Show file tree
Hide file tree
Showing 9 changed files with 872 additions and 235 deletions.
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ updates:
# no release for dev-deps
prefix-development: chore(dev-deps)
ignore:
- dependency-name: '@salesforce/dev-scripts'
- dependency-name: '*'
update-types: ['version-update:semver-major']
7 changes: 3 additions & 4 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:

jobs:
automerge:
uses: oclif/github-workflows/.github/workflows/automerge.yml@main
secrets: inherit
with:
mergeMethod: squash
uses: salesforcecli/github-workflows/.github/workflows/automerge.yml@main
secrets:
SVC_CLI_BOT_GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/create-github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: create-github-release

on:
push:
branches:
- main
- prerelease/**
tags-ignore:
- '*'
workflow_dispatch:
inputs:
prerelease:
type: string
description: 'Name to use for the prerelease: beta, dev, etc. NOTE: If this is already set in the package.json, it does not need to be passed in here.'

jobs:
release:
uses: salesforcecli/github-workflows/.github/workflows/create-github-release.yml@main
secrets:
SVC_CLI_BOT_GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
with:
prerelease: ${{ inputs.prerelease }}
# If this is a push event, we want to skip the release if there are no semantic commits
# However, if this is a manual release (workflow_dispatch), then we want to disable skip-on-empty
# This helps recover from forgetting to add semantic commits ('fix:', 'feat:', etc.)
skip-on-empty: ${{ github.event_name == 'push' }}
36 changes: 0 additions & 36 deletions .github/workflows/manualRelease.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/onPushToMain.yml

This file was deleted.

24 changes: 18 additions & 6 deletions .github/workflows/onRelease.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
name: publish

on:
release:
types: [released]
# both release and prereleases
types: [published]
# support manual release in case something goes wrong and needs to be repeated or tested
workflow_dispatch:
inputs:
tag:
description: tag that needs to publish
description: github tag that needs to publish
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: oclif/github-workflows/.github/workflows/npmPublish.yml@main
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
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 0 additions & 4 deletions git2gus/config.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
"pretest": "yarn build --noEmit && tsc -p test --noEmit"
},
"types": "lib/index.d.ts"
}
}
Loading

0 comments on commit 6cbab76

Please sign in to comment.