-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
--- | ||
name: WASM 🧭 | ||
|
||
# Running this workflow is only supported for git tags. | ||
# TODO: should we fail the workflow if someone tries to run it not for tag? | ||
# TODO: should we support running this workflow in any other way? | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
|
@@ -19,40 +15,50 @@ jobs: | |
name: WASM 🧭 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if release exists ⚙️ | ||
id: check-if-release-exists | ||
uses: insightsengineering/release-existence-action@v1 | ||
|
||
- name: Get branch names 🌿 | ||
if: >- | ||
steps.check-if-release-exists.outputs.release-exists == 'true' | ||
id: branch-name | ||
uses: tj-actions/branch-names@v7 | ||
|
||
- name: Checkout repo 🛎 | ||
uses: actions/[email protected] | ||
if: >- | ||
steps.check-if-release-exists.outputs.release-exists == 'true' | ||
with: | ||
ref: ${{ steps.branch-name.outputs.head_ref_branch }} | ||
path: ${{ github.event.repository.name }} | ||
|
||
- name: Get package name 📦 | ||
if: >- | ||
steps.check-if-release-exists.outputs.release-exists == 'true' | ||
run: | | ||
echo "PKGNAME=$(echo $(awk -F: '/Package:/{gsub(/[ ]+/,"") ; print $2}' DESCRIPTION))" >> $GITHUB_ENV | ||
shell: bash | ||
working-directory: ${{ github.event.repository.name }}/${{ inputs.package-subdirectory }} | ||
|
||
- name: Build WASM packages 🧭 | ||
if: >- | ||
steps.check-if-release-exists.outputs.release-exists == 'true' | ||
uses: r-wasm/actions/build-rwasm@v1 | ||
with: | ||
packages: | | ||
${{ github.repository_owner }}/${{ env.PKGNAME }}@${{ steps.branch-name.outputs.tag }} | ||
- name: Upload WASM packages ⬆ | ||
if: >- | ||
steps.check-if-release-exists.outputs.release-exists == 'true' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wasm-${{ env.PKGNAME }} | ||
path: | | ||
_site/bin/emscripten/contrib/*/${{ env.PKGNAME }}*.tgz | ||
_site/src/contrib/${{ env.PKGNAME }}*.tar.gz | ||
- name: Check if release exists ⚙️ | ||
id: check-if-release-exists | ||
uses: insightsengineering/release-existence-action@v1 | ||
|
||
- name: Download artifact ⏬ | ||
if: >- | ||
steps.check-if-release-exists.outputs.release-exists == 'true' | ||
|