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

Stop publishing the kernel module as any module is no longer referring to it #743

Merged
merged 1 commit into from
Feb 11, 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
77 changes: 0 additions & 77 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,83 +265,6 @@ jobs:
- run: yarn typecheck
- run: yarn test

build-kernel:
if: ${{ ! failure() }} # This job should run even if the depending jobs are skipped, but not when those jobs failed: https://qiita.com/abetomo/items/d9ede7dbeeb24f723fc5#%E8%A8%AD%E5%AE%9A%E4%BE%8B4
needs: [test-build-common, test-kernel, test-stlite-server]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: ./.github/actions/init-all
with:
python-version: ${{ env.python-version }}
node-version-file: .nvmrc

## Build and deploy @stlite/mountable
# PUBLIC_URL here is set as a relative path, which is possible to the trick introduced at https://github.com/whitphx/stlite/pull/143.
- name: Set PUBLIC_URL
run: echo "PUBLIC_URL=." >> $GITHUB_ENV
- name: Build @stlite/kernel
run: |
. .venv/bin/activate
make kernel

- name: Package
working-directory: packages/kernel
run: yarn pack

- name: Upload the built tar ball as an artifact
uses: actions/upload-artifact@v4
if: ${{ ! startsWith(github.ref, 'refs/tags/v') }}
with:
path: packages/kernel/stlite-kernel-v*.tgz
name: stlite-kernel-${{ github.sha }}.tgz

- name: Upload the built tar ball as an artifact (when pushed with a version tag)
uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/v')
with:
path: packages/kernel/stlite-kernel-v*.tgz
name: stlite-kernel-${{ github.ref_name }}.tgz

publish-kernel:
if: ${{ !failure() && startsWith(github.ref, 'refs/tags/v') }} # `!failure()` is necessary to avoid skipping this job after successful build: https://github.com/actions/runner/issues/491
needs: [build-kernel]

permissions:
contents: write # Necessary for creating releases: https://github.com/softprops/action-gh-release#permissions

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
scope: '@stlite'

- uses: actions/download-artifact@v4
with:
name: stlite-kernel-${{ github.ref_name }}.tgz
path: packages/kernel

- run: yarn publish stlite-kernel-v*.tgz --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: packages/kernel

- name: Create a new release
uses: softprops/action-gh-release@v1
with:
files: packages/kernel/stlite-kernel-v*.tgz
generate_release_notes: true

build-mountable:
if: ${{ ! failure() }} # This job should run even if the depending jobs are skipped, but not when those jobs failed: https://qiita.com/abetomo/items/d9ede7dbeeb24f723fc5#%E8%A8%AD%E5%AE%9A%E4%BE%8B4
needs: [test-kernel, test-stlite-server, test-mountable]
Expand Down
1 change: 1 addition & 0 deletions packages/kernel/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@stlite/kernel",
"private": true,
"description": "",
"version": "0.46.1",
"license": "Apache-2.0",
Expand Down
Loading