Skip to content

Commit

Permalink
cleanup workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Jun 3, 2024
1 parent 6282d8f commit 87a02ae
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ jobs:
with:
node-version: 20.x
cache: yarn
- name: Configure Git 🛠
run: |
git config user.name "Cosmology"
git config user.email "developers@cosmology.zone"
- name: Install and Build 📦
run: |
yarn
Expand Down Expand Up @@ -70,7 +66,7 @@ jobs:
with:
name: wasm-artifacts
path: wasm
prepare-and-log:
prepare-and-publish:
needs: build-wasm
runs-on: ubuntu-latest
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ jobs:
with:
node-version: 20.x
cache: yarn
- name: Configure Git 🛠
run: |
git config user.name "Cosmology"
git config user.email "developers@cosmology.zone"
- name: Install and Build 📦
run: |
yarn
Expand Down Expand Up @@ -72,7 +68,7 @@ jobs:
with:
name: wasm-artifacts
path: wasm
prepare-and-log:
prepare-and-publish:
needs: build-wasm
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .yamlize/workflows/build-and-publish-no-win.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:

prepare-and-publish:
needs: build-wasm
import-yaml: yaml/prepare-and-publish.yaml
import-yaml: yaml/prepare-and-publish-no-win.yaml
16 changes: 0 additions & 16 deletions .yamlize/workflows/build-and-test-no-win.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .yamlize/workflows/build-and-test.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .yamlize/workflows/yaml/build-artifacts-no-win.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ strategy:
steps:
- import-yaml: git/checkout.yaml
- import-yaml: node/setup.yaml
- import-yaml: git/configure.yaml
# - import-yaml: git/configure.yaml

- name: Install and Build 📦
run: |
Expand Down
2 changes: 1 addition & 1 deletion .yamlize/workflows/yaml/build-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ strategy:
steps:
- import-yaml: git/checkout.yaml
- import-yaml: node/setup.yaml
- import-yaml: git/configure.yaml
# - import-yaml: git/configure.yaml

- name: Install and Build 📦
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ steps:
run: |
find ./libpg_query/
find ./wasm
# - name: Publish to NPM 🚀
# run: |
# npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_API_KEY}}
13 changes: 9 additions & 4 deletions .yamlize/workflows/yaml/prepare-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ steps:

- import-yaml: artifacts/prepare.yaml

- name: Publish to NPM 🚀
- name: Log
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_API_KEY}}
find ./libpg_query/
find ./wasm
# - name: Publish to NPM 🚀
# run: |
# npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_API_KEY}}
4 changes: 2 additions & 2 deletions script/generate-non-win-workflows.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ const cmd = (config, workflow) => ([
].join(' '));


exec(cmd('config.yaml', 'build-and-test-no-win.yaml'), (error, _stdout, _stderr) => {
exec(cmd('config.yaml', 'build-and-publish-no-win.yaml'), (error, _stdout, _stderr) => {
if (error) {
console.error(`Error: ${error.message}`);
return;
}

// Read the generated YAML file
const outputPath = workflowDir(`generated-build-and-test-no-win.yaml`);
const outputPath = workflowDir(`generated-build-and-publish-no-win.yaml`);
try {
const fileContents = fs.readFileSync(outputPath, 'utf8');
const data = yaml.load(fileContents);
Expand Down
4 changes: 2 additions & 2 deletions script/generate-workflows.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ const cmd = (config, workflow) => ([
].join(' '));


exec(cmd('config.yaml', 'build-and-test.yaml'), (error, _stdout, _stderr) => {
exec(cmd('config.yaml', 'build-and-publish.yaml'), (error, _stdout, _stderr) => {
if (error) {
console.error(`Error: ${error.message}`);
return;
}


// Read the generated YAML file
const outputPath = workflowDir(`generated-build-and-test.yaml`);
const outputPath = workflowDir(`generated-build-and-publish.yaml`);
try {
const fileContents = fs.readFileSync(outputPath, 'utf8');
const data = yaml.load(fileContents);
Expand Down

0 comments on commit 87a02ae

Please sign in to comment.