Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
merge: PR #175 from chore/171-refactor-lsp-and-wasm-handling-staging
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmemorygrinder committed Oct 23, 2023
2 parents d6d8821 + f2ea41d commit dca1f72
Show file tree
Hide file tree
Showing 205 changed files with 15,026 additions and 16,610 deletions.
44 changes: 41 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,50 @@ jobs:
with:
from: ${{ github.sha }}
since: ${{ needs.find-last-commit.outputs.commit }}

publish-libraries:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
workspace: ${{ fromJson(needs.setup.outputs.extensions)}}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '18.16.1'

- id: setup-yarn
# Install yarn 3 & workspace-tools
run: |
corepack enable
corepack prepare yarn@stable --activate
yarn -v
- name: Install dependencies
run: |
yarn install --immutable
cargo install wasm-pack
- name: Build
run: |
yarn workspace ${{ matrix.workspace.name }} build
- name: Publish
run: yarn workspace ${{ matrix.workspace.name }} run publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

publish:
runs-on: ubuntu-latest
needs: setup
needs:
- setup
- publish-libraries
strategy:
matrix:
workspace: ${{ fromJson(needs.setup.outputs.extensions)}}
workspace: ${{ fromJson(needs.setup.outputs.libraries)}}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -48,7 +84,6 @@ jobs:
corepack enable
corepack prepare yarn@stable --activate
yarn -v
yarn plugin import workspace-tools
- name: Get workspace path
id: workspace-path
Expand Down Expand Up @@ -108,6 +143,7 @@ jobs:
- name: Install dependencies
run: |
yarn install --immutable
cargo install wasm-pack
- name: Build
run: |
Expand All @@ -117,6 +153,8 @@ jobs:
run: yarn workspace ${{ matrix.workspace.name }} run publish ${{ github.ref_name == 'dev' && '--pre-release' || '' }} ${{ steps.tag.outputs.result }}
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}


#- name: Run latest-tag
# uses: EndBug/latest-tag@latest
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ jobs:
run: |
corepack enable
corepack prepare yarn@stable --activate
yarn plugin import workspace-tools
- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down Expand Up @@ -87,7 +86,6 @@ jobs:
run: |
corepack enable
corepack prepare yarn@stable --activate
yarn plugin import workspace-tools
- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down Expand Up @@ -120,7 +118,9 @@ jobs:
run: |
corepack enable
corepack prepare yarn@stable --activate
yarn plugin import workspace-tools
- name: install
run: cargo install wasm-pack

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down Expand Up @@ -153,7 +153,6 @@ jobs:
run: |
corepack enable
corepack prepare yarn@stable --activate
yarn plugin import workspace-tools
- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/detect-workspace-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
corepack enable
corepack prepare yarn@stable --activate
yarn -v
yarn plugin import workspace-tools
- name: Get yarn workspaces output
id: raw-workspaces-list
run: |
Expand Down Expand Up @@ -81,11 +80,6 @@ jobs:
}
})
console.log(affectedWorkspaces)
const toolchainsWorkspaces = affectedWorkspaces.filter(workspace => {
return workspace.name.match(/^osmium-(?!manager)[^-\s]+$/)
}).map(workspace => ({
name: workspace.name
}))
const librariesWorkspaces = affectedWorkspaces.filter(workspace => {
return workspace.name.startsWith('@osmium-libs/')
}).map(workspace => ({
Expand All @@ -97,18 +91,18 @@ jobs:
name: workspace.name
}))
const extensionsWorkspaces = affectedWorkspaces.filter(workspace => {
return workspace.name.match(/^osmium-(?:manager|(?!\w+-\w+-\w+)(?:\w+-\w+))$/)
return workspace.name.match(/^osmium-(?:manager|(?!\w+-\w+)(?:\w+))$/)
}).map(workspace => ({
name: workspace.name
}))
const extensionsFoldersWorkspaces = affectedWorkspaces.filter(workspace => {
return workspace.name.match(/^osmium-\w+-\w+-\w+$/)
return workspace.name.match(/^osmium-\w+-\w+$/)
}).map(workspace => ({
name: workspace.name
}))
const missingExtensionsWorkspaces = extensionsFoldersWorkspaces.map(workspaceFolder => {
const extensionName = workspaceFolder.name.split('-').slice(0, 3).join('-')
const extensionName = workspaceFolder.name.split('-').slice(0, 2).join('-')
const extensionWorkspace = extensionsWorkspaces.find(workspace => {
return workspace.name === extensionName
})
Expand All @@ -129,7 +123,6 @@ jobs:
return {
affectedWorkspaces,
toolchainsWorkspaces,
extensionsWorkspaces: completeExtensionsWorkspaces,
librariesWorkspaces,
packagesWorkspaces
Expand All @@ -139,8 +132,6 @@ jobs:
run: |
echo "Affected workspaces: ${{ toJson(fromJson(steps.build-array.outputs.result).affectedWorkspaces) }}"
echo "------------------------------------"
echo "Toolchains workspaces: ${{ toJson(fromJson(steps.build-array.outputs.result).toolchainsWorkspaces) }}"
echo "------------------------------------"
echo "Extensions workspaces: ${{ toJson(fromJson(steps.build-array.outputs.result).extensionsWorkspaces) }}"
echo "------------------------------------"
echo "Libraries workspaces: ${{ toJson(fromJson(steps.build-array.outputs.result).librariesWorkspaces) }}"
Expand Down
Loading

0 comments on commit dca1f72

Please sign in to comment.