mirror of
https://github.com/php-win-ext/php-windows-builder.git
synced 2026-03-24 09:02:06 +01:00
Add release action
This commit is contained in:
12
README.md
12
README.md
@@ -131,20 +131,21 @@ It will also check if a GitHub hosted Windows runner is available with the requi
|
||||
|
||||
## Release
|
||||
|
||||
Upload the artifacts to the release.
|
||||
Upload the artifacts to a release.
|
||||
|
||||
```yaml
|
||||
- name: Upload artifact to the release
|
||||
uses: php/php-windows-builder/release@v1
|
||||
with:
|
||||
tag-name: ${{ github.event.release.tag_name }}
|
||||
release: ${{ github.event.release.tag_name }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
### Inputs
|
||||
|
||||
- `tag-name` (required) - The tag name of the release.
|
||||
- `release` (required) - The release to upload the artifacts.
|
||||
- `token` (required) - The GitHub token to authenticate with.
|
||||
|
||||
### Example workflow to build and release an extension
|
||||
|
||||
@@ -188,9 +189,8 @@ jobs:
|
||||
- name: Upload artifact to the release
|
||||
uses: php/php-windows-builder/release@v1
|
||||
with:
|
||||
tag-name: ${{ github.event.release.tag_name }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
release: ${{ github.event.release.tag_name }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
32
release/action.yml
Normal file
32
release/action.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
name: release
|
||||
description: Upload the artifacts to a release
|
||||
author: php
|
||||
|
||||
branding:
|
||||
icon: package
|
||||
color: purple
|
||||
|
||||
inputs:
|
||||
release:
|
||||
description: 'Git reference for the release'
|
||||
required: true
|
||||
token:
|
||||
description: 'GitHub token'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: artifacts
|
||||
|
||||
- name: Upload artifacts
|
||||
shell: bash
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ inputs.token }}
|
||||
run: gh release upload ${{ inputs.release }} artifacts/* --clobber
|
||||
Reference in New Issue
Block a user