Skip to content

Commit

Permalink
v1.4.9-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hiimjustin000 committed Jun 10, 2024
1 parent fbae587 commit bdb00d7
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
53 changes: 52 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,55 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: Build Output
path: ${{ steps.build.outputs.build-output }}
path: ${{ steps.build.outputs.build-output }}
draft:
name: Draft Release
runs-on: ubuntu-latest
needs: ['package']

steps:
- name: Delete Existing Release
uses: actions/github-script@v7
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const owner = process.env.GITHUB_REPOSITORY.split("/")[0];
const repo = process.env.GITHUB_REPOSITORY.split("/")[1];
const response = await github.rest.repos.listReleases({ owner, repo });
console.log("Checking for existing release...");
for (const release of response.data) {
if (release.tag_name == process.env.COMMIT_MESSAGE) {
console.log("Existing release found, deleting...");
await github.rest.repos.deleteRelease({ owner, repo, release_id: release.id });
await github.rest.git.updateRef({
owner,
repo,
ref: `tags/${release.tag_name}`,
sha: context.sha,
force: true
});
}
}
console.log("Done.");
- name: Download Build Output
uses: actions/download-artifact@v4
with:
name: Build Output
path: build-output

- name: Create Draft Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
build-output/*.geode
build-output/*.pdb
tag_name: ${{ github.event.head_commit.message }}
name: ${{ github.event.head_commit.message }}
draft: true
body: |
Replace with release notes
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"geode": "3.0.0-alpha.1",
"geode": "3.0.0-alpha.2",
"gd": {
"android": "2.206",
"win": "2.206",
Expand Down

0 comments on commit bdb00d7

Please sign in to comment.