mirror of
https://github.com/directus/directus.git
synced 2026-01-14 20:38:29 -05:00
Small Release workflow clean-up (#16083)
* Consistent usage of `if` statements Brackets are not required in `if` statements, see https://docs.github.com/en/actions/learn-github-actions/expressions#about-expressions * Use prepare action to setup pnpm in publish-npm job
This commit is contained in:
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
@@ -56,7 +56,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
# Skip this step in forks
|
||||
if: ${{ github.repository_owner == 'directus' }}
|
||||
if: github.repository_owner == 'directus'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
@@ -67,20 +67,10 @@ jobs:
|
||||
path: '**/dist'
|
||||
key: build-artifacts-${{ github.sha }}
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
- name: Prepare
|
||||
uses: ./.github/actions/prepare
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- uses: pnpm/action-setup@v2.2.2
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
run_install: false
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm i
|
||||
build: false
|
||||
|
||||
- name: Publish packages to NPM
|
||||
env:
|
||||
@@ -131,14 +121,14 @@ jobs:
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
if: ${{ env.DOCKERHUB_IMAGE }}
|
||||
if: env.DOCKERHUB_IMAGE
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v2
|
||||
if: ${{ env.GHCR_IMAGE }}
|
||||
if: env.GHCR_IMAGE
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
|
||||
Reference in New Issue
Block a user