forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.44 KB
/
publish-artifacts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 }}
sha=34388885afdf5bb1d7cebb025242ad6de3286f72
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 }}
- run: ./ci/merge-artifacts.sh
# 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
single-commit: true
clean: true
if: github.ref == 'refs/heads/main'
- run: npm install --production
working-directory: .github/actions/github-release
- name: Publish Release
uses: ./.github/actions/github-release
with:
files: "dist/*"
token: ${{ github.token }}
continue-on-error: true