You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.4 KiB
51 lines
1.4 KiB
name: Publish Artifacts
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags-ignore: [dev]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish artifacts of build
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'bytecodealliance/wasmtime'
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: |
|
|
sha=${{ github.sha }}
|
|
run_id=$(
|
|
gh api -H 'Accept: application/vnd.github+json' \
|
|
/repos/${{ github.repository }}/actions/workflows/main.yml/runs\?exclude_pull_requests=true \
|
|
| jq '.workflow_runs' \
|
|
| jq "map(select(.head_commit.id == \"$sha\"))[0].id" \
|
|
)
|
|
gh run download $run_id
|
|
ls
|
|
find bins-*
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
# Deploy the `gh-pages.tar.gz` artifact to the `gh-pages` branch.
|
|
- run: tar xf gh-pages.tar.gz
|
|
working-directory: gh-pages
|
|
- name: Deploy to gh-pages
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
with:
|
|
folder: ./gh-pages/gh-pages
|
|
if: github.ref == 'refs/heads/main'
|
|
|
|
- run: npm install --production
|
|
working-directory: .github/actions/github-release
|
|
- run: |
|
|
mkdir dist
|
|
mv -t dist bins-*/*.tar.*
|
|
mv -t dist bins-*/*.{zip,msi,wasm}
|
|
- name: Publish Release
|
|
uses: ./.github/actions/github-release
|
|
with:
|
|
files: "dist/*"
|
|
token: ${{ github.token }}
|
|
continue-on-error: true
|
|
|