Skip to content

Commit

Permalink
chore(github-action): try fixing version name for pre-release (#62)
Browse files Browse the repository at this point in the history
* chore(actions): created action for automatic versioning and release

* Update node.js.yml

* chore(github-action): changed run command to the deployBuild script

* fix(github-action): added npm install step

* chore(github-action): try to fix file not found error

* chore(github-action): try to fix file not found error

* chore(deploy-script): replaced fixed strings with path variables

* chore(deploy-script): fixed lower case letters, for unix environments

* chore(github-action): added user.name and email to workflow

* chore(github-action): removed pull-requests as they not build releases

* chore(github-action): fixed a better version tagging
  • Loading branch information
tabris87 authored Feb 29, 2024
1 parent a5beb57 commit 99b4c9b
Showing 1 changed file with 31 additions and 28 deletions.
59 changes: 31 additions & 28 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,40 @@ name: Node.js CI

on:
push:
branches: [ "develop" ]
branches: ["develop"]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: '20.x'
cache: 'npm'
- run: npm ci
- name: Configure committer
run: |
git config user.name "Github Actions Bot"
git config user.email "<>"
- run: npm run changelog
- run: npm run deployBuild -- --pre
working-directory: ${{ github.workspace }}
- name: Create Pre Release
id: create_pre_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Automatic generated pre-release with the latest features and bugfixes
draft: false
prerelease: true
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: "20.x"
cache: "npm"
- run: npm ci
- name: Configure committer
run: |
git config user.name "Github Actions Bot"
git config user.email "<>"
- run: npm run changelog
- run: npm run deployBuild -- --pre
working-directory: ${{ github.workspace }}
- name: Set release names
id: set_names
run: |
echo "version=$(cat package.json | grep -sw '"\bversion\b"' | cut -d '"' -f 4)_nightly" >> "$GITHUB_ENV"
- name: Create Pre Release
id: create_pre_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ version }}
release_name: Pre-Release ${{ version }}
body: |
Automatic generated pre-release with the latest features and bugfixes
draft: false
prerelease: true

0 comments on commit 99b4c9b

Please sign in to comment.