Skip to content

Commit

Permalink
ci(nightly): create release?
Browse files Browse the repository at this point in the history
  • Loading branch information
itschip committed Nov 5, 2023
1 parent b85d324 commit cadfbef
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 25 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ jobs:
cd ./temp && zip -r ../npwd.zip ./npwd
- name: Create Release
uses: "marvinpinto/action-automatic-releases@v1.2.1"
uses: "project-error/release-action@v1.4"
id: auto_release
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
title: NPWD Nightly ${{ steps.get_tag.outputs.release_tag }}
prerelease: true
automatic_release_tag: ${{ steps.get_tag.outputs.release_tag }}
files: npwd.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56 changes: 33 additions & 23 deletions .github/workflows/tagged-releases.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Tagged Release Publisher

on:
workflow_dispatch:

Expand All @@ -8,14 +9,41 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get tag
run: echo ::set-output name=VERSION_TAG::${GITHUB_REF/refs\/tags\//}
uses: project-error/[email protected]
with:
environment: "dev"
prerelease: true
id: get_tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: Bump manifest version
run: node .github/actions/bump-manifest-version.js
env:
TGT_RELEASE_VERSION: ${{ steps.get_tag.outputs.release_tag }}

- name: Push manifest change
uses: EndBug/add-and-commit@v8
with:
add: fxmanifest.lua
push: true
author_name: Manifest Bumper
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: "chore: bump manifest version to nightly ${{ steps.get_tag.outputs.release_tag }}"

# super hacky
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.repository.default_branch }}

- name: Install pnpm
uses: pnpm/[email protected]
with:
Expand All @@ -30,25 +58,6 @@ jobs:

- name: Run build
run: REACT_APP_VERSION=${{ steps.get_tag.outputs.VERSION_TAG }} pnpm build

- name: Bump manifest version
run: node .github/actions/bump-manifest-version.js
env:
TGT_RELEASE_VERSION: ${{ github.ref_name }}

- name: Push manifest change
uses: EndBug/add-and-commit@v8
with:
add: fxmanifest.lua
push: true
author_name: Manifest Bumper
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: "chore: bump manifest version to ${{ github.ref_name }}"

- name: Update tag ref
uses: EndBug/latest-tag@latest
with:
tag-name: ${{ github.ref_name }}

#- name: Create Sentry Release (NPWD)
# run: |
Expand Down Expand Up @@ -77,8 +86,9 @@ jobs:
id: auto_release
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
title: NPWD Release | ${{ steps.get_tag.outputs.VERSION_TAG }}
title: NPWD Release ${{ steps.get_tag.outputs.release_tag }}
prerelease: false
automatic_release_tag: ${{ steps.get_tag.outputs.release_tag }}
files: npwd.zip

env:
Expand Down

0 comments on commit cadfbef

Please sign in to comment.