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 pipeline #106

Merged
merged 1 commit into from
Jan 9, 2024
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
18 changes: 4 additions & 14 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]

steps:
- name: "Checking changed files"
id: files
uses: softprops/diffset@d5947696689a571f7a984a52505e2649eead5c22 # v1
uses: softprops/diffset@db8c4e13f5cc3f8ab666ba2cb6998b688058a41c # v1
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
with:
base: main
Expand All @@ -29,7 +29,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Checking-out code"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: "Fetching main to compare"
Expand All @@ -44,20 +44,10 @@ jobs:
id: variablesWindows
run: echo "arg=$(If ('${{ steps.files.outputs.global_files }}' -eq '' -AND '${{ github.event_name == 'pull_request' }}' -eq 'true'){ echo '--since' } Else { echo '' })" >> ${{ runner.os == 'Windows' && '$env:GITHUB_OUTPUT' || '$GITHUB_OUTPUT' }}
- name: "Defining node version"
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
uses: actions/setup-node@d86ebcd40b3cb50b156bfa44dd277faf38282d12 # v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
- name: "Get yarn cache directory path"
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> ${{ runner.os == 'Windows' && '$env:GITHUB_ENV' || '$GITHUB_ENV' }}
- name: "Defining cache"
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # v2
env:
cache-name: cache-node-modules
with:
path: ${{ env.dir }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
- name: "Installing dependencies"
run: yarn install
- name: "Running build for development"
Expand Down
18 changes: 4 additions & 14 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]

steps:
- name: "Checking changed files"
id: files
uses: softprops/diffset@d5947696689a571f7a984a52505e2649eead5c22 # v1
uses: softprops/diffset@db8c4e13f5cc3f8ab666ba2cb6998b688058a41c # v1
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
with:
base: main
Expand All @@ -26,7 +26,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Checking-out code"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: "Fetching main to compare"
Expand All @@ -41,20 +41,10 @@ jobs:
id: variablesWindows
run: echo "arg=$(If ('${{ steps.files.outputs.global_files }}' -eq '' -AND '${{ github.event_name == 'pull_request' }}' -eq 'true'){ echo '--since' } Else { echo '' })" >> ${{ runner.os == 'Windows' && '$env:GITHUB_OUTPUT' || '$GITHUB_OUTPUT' }}
- name: "Defining node version"
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
uses: actions/setup-node@d86ebcd40b3cb50b156bfa44dd277faf38282d12 # v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
- name: "Get yarn cache directory path"
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> ${{ runner.os == 'Windows' && '$env:GITHUB_ENV' || '$GITHUB_ENV' }}
- name: "Defining cache"
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # v2
env:
cache-name: cache-node-modules
with:
path: ${{ env.dir }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
- name: "Installing dependencies"
run: yarn install
- name: "Running release for production"
Expand Down
3 changes: 2 additions & 1 deletion configs/jsactions/rollup-plugin-collect-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ async function copyJsModule(moduleSourcePath, to) {
"!**/{android,ios,windows,mac,jest,github,gradle,__*__,docs,jest,example*}/**/*",
"!**/*.{config,setup}.*",
"!**/*.{podspec,flow}"
]
],
overwrite: true
});
}

Expand Down
10 changes: 8 additions & 2 deletions configs/jsactions/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,20 @@ export default async args => {
mkdirSync(path, { recursive: true });
await copyAsync(
join(dirname(require.resolve("fbjs")), "lib", "invariant.js"),
join(path, "invariant.js")
join(path, "invariant.js"),
{
overwrite: true
}
);
} else if (args.configProject === "nanoflowcommons") {
// `invariant` is being used silently by @react-native-community/geolocation; it is not listed as a dependency nor peerDependency.
// https://github.dev/react-native-geolocation/react-native-geolocation/blob/1786929f2be581da91082ff857c2393da5e597b3/js/implementation.native.js#L13
await copyAsync(
dirname(require.resolve("invariant")),
join(outDir, "node_modules", "invariant")
join(outDir, "node_modules", "invariant"),
{
overwrite: true
}
);
}

Expand Down
Loading