mirror of
https://github.com/copy/v86.git
synced 2025-12-31 04:23:15 +00:00
Significantly improve the release workflow
This commit is contained in:
parent
e59deeb7e5
commit
fc51f2b9d2
1 changed files with 39 additions and 13 deletions
52
.github/workflows/release.yml
vendored
52
.github/workflows/release.yml
vendored
|
|
@ -1,37 +1,63 @@
|
|||
name: Automated Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release to GitHub
|
||||
build:
|
||||
name: Build v86
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/cache@v3
|
||||
id: cache-rustup
|
||||
with:
|
||||
path: ~/.cache/rustup/
|
||||
key: ${{ runner.os }}-rustup
|
||||
- name: rustup
|
||||
- name: Setup toolchain
|
||||
run: |
|
||||
rustup toolchain install stable
|
||||
rustup toolchain install stable --profile minimal
|
||||
rustup target add wasm32-unknown-unknown
|
||||
rustup component add rustfmt
|
||||
|
||||
- name: Build v86
|
||||
run: make build/libv86.js build/v86.wasm build/v86-fallback.wasm
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: v86
|
||||
path: |
|
||||
build/*.js
|
||||
build/*.js.map
|
||||
build/*.wasm
|
||||
|
||||
upload:
|
||||
name: Upload release
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: github.ref == 'refs/heads/master'
|
||||
|
||||
steps:
|
||||
- name: Delete old release and tag
|
||||
uses: dev-drprasad/delete-tag-and-release@v1.0.1
|
||||
with:
|
||||
delete_release: true
|
||||
tag_name: latest
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: build
|
||||
|
||||
- name: Release to GitHub
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
name: Latest Release
|
||||
tag: latest
|
||||
commit: master
|
||||
body: ${{ github.event.head_commit.message }}
|
||||
artifacts: "build/*.js, build/*.js.map, build/*.wasm"
|
||||
allowUpdates: true
|
||||
artifacts: "build/v86/*.js, build/v86/*.js.map, build/v86/*.wasm"
|
||||
prerelease: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue