mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
ci(tagged-release): no longer tag releases with v*
makes this easier for semver tracking and consistency sake
This commit is contained in:
1 parent
13952fa318
commit
dce079222a
1 file changed
+31
-13
@@ -2,14 +2,36 @@ name: Tagged Release Publisher
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "v*"
|
- "*"
|
||||||
jobs:
|
jobs:
|
||||||
create-tagged-release:
|
bump-version:
|
||||||
|
name: Bump Version
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
VERSION_TAG: ${{ steps.get_version_tag.outputs.VERSION_TAG }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout source code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.ref }}
|
||||||
|
|
||||||
|
- name: Get Version Tag
|
||||||
|
id: get_version_tag
|
||||||
|
run: echo ::set-output name=VERSION_TAG::${GITHUB_REF/refs\/tags\//}
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 14.x
|
||||||
|
- name: Bump package shells
|
||||||
|
run: |
|
||||||
|
cd phone && npm version ${{ needs.bump-version.outputs.VERSION_TAG }}
|
||||||
|
|
||||||
|
create-tagged-release:
|
||||||
name: Build and Create Tagged Release
|
name: Build and Create Tagged Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: bump-version
|
||||||
|
|
||||||
outputs:
|
|
||||||
VERSION_TAG: ${{ steps.get_vars.outputs.VERSION_TAG }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install archive tools
|
- name: Install archive tools
|
||||||
run: sudo apt install zip
|
run: sudo apt install zip
|
||||||
@@ -20,10 +42,6 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
|
|
||||||
- name: Get variables
|
|
||||||
run: echo ::set-output name=VERSION_TAG::${GITHUB_REF/refs\/tags\//}
|
|
||||||
id: get_vars
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn
|
run: yarn
|
||||||
|
|
||||||
@@ -39,10 +57,9 @@ jobs:
|
|||||||
SENTRY_URL: https://sentry.projecterror.dev/
|
SENTRY_URL: https://sentry.projecterror.dev/
|
||||||
with:
|
with:
|
||||||
environment: production
|
environment: production
|
||||||
tagName: ${{ steps.get_vars.outputs.VERSION_TAG }}
|
tagName: ${{ needs.bump-version.outputs.VERSION_TAG }}
|
||||||
sourceMapOptions: './resources/html/static/js'
|
sourceMapOptions: './resources/html/static/js'
|
||||||
|
|
||||||
|
|
||||||
- name: Create Sentry Release (NodeJS)
|
- name: Create Sentry Release (NodeJS)
|
||||||
uses: tclindner/[email protected]
|
uses: tclindner/[email protected]
|
||||||
env:
|
env:
|
||||||
@@ -60,16 +77,17 @@ jobs:
|
|||||||
mkdir -p ./temp/npwd/resources
|
mkdir -p ./temp/npwd/resources
|
||||||
cp ./{LICENSE,README.md,config.json,import.sql,fxmanifest.lua} ./temp/npwd/
|
cp ./{LICENSE,README.md,config.json,import.sql,fxmanifest.lua} ./temp/npwd/
|
||||||
cp -r ./resources/{dist,html} ./temp/npwd/resources
|
cp -r ./resources/{dist,html} ./temp/npwd/resources
|
||||||
cd ./temp && zip -r npwd-${{ steps.get_vars.outputs.VERSION_TAG }}.zip ./npwd
|
cd ./temp && zip -r npwd-${{ needs.bump-version.outputs.VERSION_TAG }}.zip ./npwd
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: "marvinpinto/[email protected]"
|
uses: "marvinpinto/[email protected]"
|
||||||
id: auto_release
|
id: auto_release
|
||||||
with:
|
with:
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
title: NPWD Release | ${{ steps.get_vars.outputs.VERSION_TAG }}
|
title: NPWD Release | ${{ needs.bump-version.outputs.VERSION_TAG }}
|
||||||
prerelease: false
|
prerelease: false
|
||||||
files: npwd-${{ steps.get_vars.outputs.VERSION_TAG }}.zip
|
files: npwd-${{ needs.bump-version.outputs.VERSION_TAG }}.zip
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
CI: false
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Reference in new issue
Block a user