Skip to content

Commit

Permalink
[ci] Chore: Remove SSH_KEY secret (#7143)
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum authored Feb 6, 2025
1 parent 2c90066 commit a35432e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/call-increment-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ on:
channel:
required: true
type: string
git-repo:
required: true
type: string
secrets:
SSH_KEY:
required: true
outputs:
version:
description: 'The new package.json version, e.g. "0.16.0"'
Expand All @@ -35,10 +29,11 @@ jobs:
version: ${{ steps.increment-version.outputs.version }}
tag-ref: ${{ steps.increment-version.outputs.tag-ref }}
latest-release: ${{ steps.latest.outputs.release }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.SSH_KEY }}
fetch-depth: 0
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
Expand All @@ -64,4 +59,3 @@ jobs:
CHANNEL: ${{ inputs.channel }}
LATEST_RELEASE: ${{ steps.latest.outputs.release }}
DRY_RUN: ${{ inputs.dry-run && '1' || '' }}
GIT_REPO: ${{ inputs.git-repo }}
3 changes: 0 additions & 3 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
channel: nightly
increment: prerelease
dry-run: false
git-repo: '[email protected]:facebook/lexical.git'
secrets:
SSH_KEY: ${{ secrets.SSH_KEY }}
npm-release:
uses: ./.github/workflows/call-npm-publish.yml
needs: [increment-version]
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ jobs:
increment: ${{ inputs.increment }}
dry-run: false
channel: ${{ inputs.increment == 'prerelease' && 'next' || 'latest' }}
git-repo: '[email protected]:facebook/lexical.git'
secrets:
SSH_KEY: ${{ secrets.SSH_KEY }}
5 changes: 2 additions & 3 deletions scripts/npm/postversion.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

const {spawn} = require('child-process-promise');

const {npm_package_version, CHANNEL, GIT_REPO, GITHUB_OUTPUT} = process.env;
const {npm_package_version, CHANNEL, GITHUB_OUTPUT} = process.env;

// Previously this script was defined directly in package.json as the
// following (in one line):
Expand All @@ -31,7 +31,6 @@ async function main() {
// CHANNEL should already be validated by increment-version which calls this (indirectly)
for (const [k, v] of Object.entries({
CHANNEL,
GIT_REPO,
npm_package_version,
})) {
if (!v) {
Expand Down Expand Up @@ -77,7 +76,7 @@ async function main() {
'git',
'push',
...(process.env.DRY_RUN === '1' ? ['--dry-run'] : []),
GIT_REPO,
'origin',
...refs.map((ref) => `+${ref}`),
]);
if (GITHUB_OUTPUT) {
Expand Down

0 comments on commit a35432e

Please sign in to comment.