Skip to content

Add tests for update body #23

Add tests for update body

Add tests for update body #23

Workflow file for this run

name: release
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#on
on:
push:
tags:
- "*"
jobs:
draft_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "find env"
run: |
set | grep GITHUB_ | grep -v GITHUB_TOKEN
zip -r pkg.zip *.md
echo "$(openssl rand -hex 4)" > "random-name-$(openssl rand -hex 4).txt"
echo "$(openssl rand -hex 4)" > "random-name-$(openssl rand -hex 4).txt"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }} (draft)
body: |
Test upload-to-github-release works with `actions/create-release`.
draft: true
prerelease: false
- uses: xresloader/upload-to-github-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "*.md;*.zip;random-name-*.txt"
delete_file: "random-name-*.txt;random-*.txt"
release_id: ${{ steps.create_release.outputs.id }}
update_release_body: ${{ github.ref }}
update_release_body_append: "true"
overwrite: true
verbose: true
prelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "find env"
run: |
set | grep GITHUB_ | grep -v GITHUB_TOKEN
zip -r pkg.zip *.md
echo "$(openssl rand -hex 4)" > "random-name-$(openssl rand -hex 4).txt"
echo "$(openssl rand -hex 4)" > "random-name-$(openssl rand -hex 4).txt"
echo 'Test upload-to-github-release works with `actions/create-release` and read body from file.' > release-body.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}-prelease
release_name: Release ${{ github.ref }} (prelease)
body: |
Test upload-to-github-release works with `actions/create-release`.
draft: false
prerelease: true
- uses: xresloader/upload-to-github-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "*.md;*.zip;random-name-*.txt"
delete_file: "random-name-*.txt;random-*.txt"
release_id: ${{ steps.create_release.outputs.id }}
update_release_body_path: release-body.md
overwrite: true
verbose: true