-
Notifications
You must be signed in to change notification settings - Fork 1.3k
60 lines (54 loc) · 1.5 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
53
54
55
56
57
58
59
60
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@v4
- uses: ./.github/actions/fetch-run-id
- run: |
gh run download ${COMMIT_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
- if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v5
- if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: "./gh-pages/gh-pages"
- 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
# See https://github.com/actions/deploy-pages
deploy:
name: Deploy gh-pages artifact
if: github.ref == 'refs/heads/main'
needs: publish
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4