Skip to content

Commit 2eb93ca

Browse files
committed
try workflow_dispatch
1 parent 8eaff9c commit 2eb93ca

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

.github/workflows/validate_and_release.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@ on:
88
- main
99
pull_request:
1010
branches: ['*']
11-
release:
12-
types: [published]
11+
# Allow to trigger the generation of release files automatically
12+
workflow_dispatch:
13+
inputs:
14+
version:
15+
description: 'version number'
16+
required: true
17+
type: string
1318

1419
jobs:
1520
validate:
@@ -33,16 +38,28 @@ jobs:
3338
3439
release:
3540
needs: [validate]
36-
if: github.event_name == 'release'
41+
if: github.event == 'workflow_dispatch'
3742
runs-on: ubuntu-latest
3843
steps:
3944
- uses: actions/checkout@v4
4045
- name: Set up Python
4146
uses: actions/setup-python@v5
4247
with:
4348
python-version: 3.12
49+
4450
- name: Make a release
4551
run: |
46-
echo "Making a release"
47-
echo ${{ github.event_name }}
48-
# python scripts/makeRelease.py ci-release
52+
echo "Making a release ${{ inputs.version }}"
53+
mkdir releases/${{ inputs.version }}
54+
cp contexts/reproschema releases/${{ inputs.version }}/base
55+
# python scripts/makeRelease.py ${{ inputs.version }}
56+
57+
- name: Open pull requests to add files
58+
uses: peter-evans/create-pull-request@v6
59+
with:
60+
commit-message: "[REL] adding files to for release ${{ inputs.version }}"
61+
base: main
62+
token: ${{ secrets.GITHUB_TOKEN }}
63+
delete-branch: true
64+
title: "[REL] adding files to for release ${{ inputs.version }}"
65+
body: done via this [GitHub Action](https://github.com/${{ github.repository_owner }}/reproschema/blob/main/.github/workflows/validate_and_release.yml)

0 commit comments

Comments
 (0)