Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jkfran authored May 2, 2023
1 parent 8c27222 commit bf6a3ef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ jobs:
with:
script: |
const { owner, repo } = context.repo;
const version = "${{ env.VERSION }}";
const fs = require("fs");
const content = fs.readFileSync("Cargo.toml", "utf8");
const match = content.match(/^version = "(.*?)"/m);
const version = match ? match[1] : "";
const tag = `v${version}`;
console.log("Extracted version: ", tag);
let releaseExists = false;
try {
await github.rest.repos.getReleaseByTag({
Expand Down

0 comments on commit bf6a3ef

Please sign in to comment.