fix(deps): update patch updates (patch) #134
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Preview Release" | |
on: # yamllint disable-line rule:truthy | |
# eslint-disable-next-line yml/no-empty-mapping-value | |
pull_request: # yamllint disable-line rule:empty-values | |
permissions: | |
contents: "read" # to fetch code (actions/checkout) | |
env: | |
NX_BRANCH: "${{ github.event.number }}" | |
NX_RUN_GROUP: "${{ github.run_id }}" | |
HEAD_REF: "${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name }}" | |
HEAD_REPOSITORY: "${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }}" | |
jobs: | |
preview: | |
name: "Preview Release" | |
if: "github.repository == 'anolilab/javascript-style-guide'" | |
runs-on: "ubuntu-latest" | |
permissions: | |
contents: "write" | |
issues: "write" | |
checks: "write" | |
pull-requests: "write" | |
steps: | |
- name: "Harden Runner" | |
uses: "step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6" # v2.8.1 | |
with: | |
egress-policy: "audit" | |
- name: "Git checkout" | |
uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4.2.2 | |
with: | |
# Number of commits to fetch. 0 indicates all history for all branches and tags. | |
# Pulls all commits (needed for NX) | |
fetch-depth: 0 | |
env: | |
GIT_COMMITTER_NAME: "GitHub Actions Shell" | |
GIT_AUTHOR_NAME: "GitHub Actions Shell" | |
EMAIL: "github-actions[bot]@users.noreply.github.com" | |
- name: "Derive appropriate SHAs for base and head for `nx affected` commands" | |
id: "setSHAs" | |
uses: "nrwl/nx-set-shas@76907e7e5d3cd17ddb5e2b123389f054bffcdd03" # v4 | |
- name: "Setup resources and environment" | |
id: "setup" | |
uses: "anolilab/workflows/step/setup@main" | |
with: | |
node-version: "18.x" | |
cache-prefix: "preview-release" | |
# Temporary solution until Nx solve this https://github.com/nrwl/nx/issues/22259 | |
- name: "Get changed files" | |
id: "files" | |
uses: "tj-actions/changed-files@20576b4b9ed46d41e2d45a2256e5e2316dde6834" # v43.0.1 | |
with: | |
files_ignore_from_source_file: ".github/ignore-files-for-nx-affected.yml" | |
base_sha: "${{ steps.setSHAs.outputs.base }}" | |
separator: "," | |
- name: "Build" | |
shell: "bash" | |
run: | | |
files="${{ steps.files.outputs.all_changed_files }}"; | |
pnpm run build:affected:prod:packages --files=${files//\\/\/} | |
- name: "Prepare nx cache" | |
shell: "bash" | |
run: "tar -cf - .nx/cache | lz4 > /tmp/nx_cache.tar.lz4" # compress nx cache | |
- name: "Preview Release" | |
shell: "bash" | |
run: "node ./scripts/publish-preview-release.js" | |
env: | |
CHANGED_FILES: "${{ steps.files.outputs.all_changed_files }}" |