Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: github user config action #141

Merged
merged 2 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why node version has been downgraded?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because there was a mistake, we've already used 16 version everywhere

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.

Loading