Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
audunsolemdal committed Nov 29, 2023
1 parent 04d001d commit 17abe90
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/generate-release-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,21 @@ jobs:
with:
script: |
const { owner, repo } = context.repo;
const query = `query($owner: String!, $repo: String!, $first: Int!) {
const query = `query($owner: String!, $repo: String!, $refPrefix: String!, $first: Int!) {
repository(owner: $owner, name: $repo) {
refs(refPrefix: $refPrefix, first: $first, orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) {
edges { node { name } }
}
}
}`;
const query2 = `query($owner: String!, $repo: String!, $first: Int!) {
repository(owner: $owner, name: $repo) {
refs(first: $first, orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) {
edges { node { name } }
}
}
}`;
let refPrefix = `refs/tags/${process.env.PACKAGE_NAME}/`;
if (process.env.PACKAGE_NAME == 'main')
{
Expand All @@ -130,7 +138,7 @@ jobs:
let result;
if (process.env.PACKAGE_NAME == 'main')
{
result = await github.graphql(query, { owner, repo,
result = await github.graphql(query2, { owner, repo,
first: 1,
});
}
Expand Down

0 comments on commit 17abe90

Please sign in to comment.