forked from pyodide/pyodide
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 2.54 KB
/
update_cross_build_releases.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
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Update cross-build metadata file
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: "Version number to update to. This should not contain the 'v' prefix, since our releases on GitHub do not have it."
required: true
env:
version: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.version }}
jobs:
update_cross_build_releases:
runs-on: ubuntu-latest
steps:
# Note: we check out the main branch so that the cross-build metadata
# file is always updated on top of the latest state of the repository.
- name: Checkout main branch
uses: actions/checkout@v4
with:
submodules: recursive
ref: main
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install pyodide-build
run: |
python -m pip install --upgrade pip
make pyodide_build
- name: Update cross-build metadata file
id: update_cross_build_metadata
working-directory: tools
run: |
python update_cross_build_releases.py "${{ env.version }}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update cross-build metadata file for version ${{ env.version }} [skip ci]
title: Update cross-build metadata file for version ${{ env.version }}
body: |
This PR updates the cross-build metadata file for the new version ${{ env.version }}.
Requesting a review from the @pyodide/core team.
branch: update-cross-build-metadata-${{ env.version }}
base: main
branch-suffix: timestamp
draft: true
- name: Create an issue if the update fails
if: failure() || steps.update_cross_build_metadata.outcome == 'failure'
uses: dacbd/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Update cross-build metadata file for version ${{ env.VERSION }} failed
body: |
## Description
The update of the cross-build metadata file for version ${{ env.VERSION }} failed.
## Additional information
Please check the logs at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
for more information and update the metadata file manually if necessary.
labels:
assignees: ${{ github.actor }}