Skip to content

patch: dev

patch: dev #14

Workflow file for this run

name: create-release
on:
push:
branches:
- main
jobs:
release:
name: "Create Release"
runs-on: "ubuntu-latest"
permissions: write-all
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
- run: |
echo 'jj' > newfile.txt
echo "RELEASE_TAG=v1.0.0" >> $GITHUB_ENV
echo "RELEASE_VER=1.0.0" >> $GITHUB_ENV
- name: Upload release attachment
uses: actions/github-script@v4
with:
script: |
const fs = require('fs');
// Get release for this tag
const release = await github.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
process.env.RELEASE_TAG
});
print(release)
// Upload the release asset
await github.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.data.id,
name: "kong-plugin-myplugin-" + process.env.RELEASE_VER + "-1.rockspec",
data: await fs.readFileSync("newfile.txt")
});