test #5804
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous integration | |
on: | |
push: | |
branches: | |
- master | |
- '[0-9]+.[0-9]+' | |
tags: | |
- '*' | |
pull_request: | |
permissions: | |
actions: write | |
contents: write | |
env: | |
HAS_SECRETS: ${{ secrets.HAS_SECRETS }} | |
jobs: | |
build: | |
name: Continuous integration | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 30 | |
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create Release | |
uses: actions/github-script@v7 | |
with: | |
script: |- | |
const fs = require('fs'); | |
const release = await github.request('POST /repos/{owner}/{repo}/releases', { | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
tag_name: 'test', | |
name: 'test', | |
draft: true, | |
prerelease: true, | |
generate_release_notes: false, | |
headers: { | |
'X-GitHub-Api-Version': '2022-11-28' | |
} | |
}); | |
console.log(release); | |
await github.rest.repos.uploadReleaseAsset({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
url: release.data.upload_url, | |
name: "asset name test", | |
file: fs.readFileSync("README.md"), | |
headers: { | |
'X-GitHub-Api-Version': '2022-11-28', | |
'content-type': 'text/plain' | |
}, | |
}); |