Skip to content

Commit

Permalink
Merge pull request #141 from MacPaw/fix/github-user-config-action
Browse files Browse the repository at this point in the history
fix: github user config action
  • Loading branch information
wallwhite authored Oct 3, 2023
2 parents aeb2b70 + d4147a6 commit 0fb6381
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/six-peas-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@macpaw/macpaw-ui": patch
---

Patch changes to trigger release
8 changes: 6 additions & 2 deletions .github/actions/github-config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ inputs:
gpg-key-base64:
description: 'Base64 GPG key'
required: true
gpg-key-signing:
description: 'Git signing key'
required: true

runs:
using: "composite"
steps:
Expand All @@ -12,9 +16,9 @@ runs:
echo ${{ inputs.gpg-key-base64 }} | base64 -d > ${GITHUB_WORKSPACE}/.gpg/private.key
gpg --import ${GITHUB_WORKSPACE}/.gpg/private.key
git config --global user.signingkey <user-signingkey>
git config --global user.signingkey ${{ inputs.gpg-key-signing }}
git config --global commit.gpgsign true
git config user.name ci-macpaw
git config user.email admin+ci-gh@macpaw.com
shell: bash
name: Update git config
name: Update git config
9 changes: 1 addition & 8 deletions .github/actions/release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,14 @@ inputs:
description: 'The command to use to release'
required: false
default: 'release'
gpg-key-base64:
description: 'The base64 encoded GPG key to use'
required: true

outputs:
release-ready:
description: "Random number"
value: ${{ steps.output-generator.outputs.release-ready }}
runs:
using: composite
steps:
- name: Configure git user
uses: ./.github/actions/github-config
with:
gpg-key-base64: ${{ inputs.gpg-key-base64 }}

- name: Prepare node
uses: ./.github/actions/prepare-node
id: prepare-node
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:

- name: Checkout
uses: actions/checkout@v3

- name: Configure git user
uses: ./.github/actions/github-config
with:
gpg-key-base64: ${{ secrets.CI_GITHUB_GPG_KEY_BASE64 }}
gpg-key-signing: ${{ secrets.CI_GITHUB_GPG_KEY_SIGNING }}

- name: Make a release if needed
uses: ./.github/actions/release
Expand All @@ -28,8 +34,7 @@ jobs:
release-commit-message: 'chore(release): version update for packages'
github-token: ${{ secrets.GITHUB_TOKEN }}
release-command: 'changes:release'
gpg-key-base64: ${{ secrets.CI_GITHUB_GPG_KEY_BASE64 }}


- name: Generate outputs
id: releaseOutputs
if: steps.release.outputs.release-ready == 'true'
Expand All @@ -51,7 +56,7 @@ jobs:
- name: Prepare
uses: ./.github/actions/prepare-packages
with:
node-version: 18
node-version: 16
build-command: 'lib'

publish-npm:
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0fb6381

Please sign in to comment.