Skip to content

Commit

Permalink
chore: add build number
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Jul 1, 2020
1 parent 45d9c65 commit 69d4ef5
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/actions/get-build-number/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: TEST
description: Prepare Pull Request for the current change
outputs:
build_number:
description: The release body
runs:
using: 'node12'
main: index.js

16 changes: 16 additions & 0 deletions .github/actions/get-build-number/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const fs = require('fs');
const core = require('@actions/core');
const convBump = require('conventional-recommended-bump');
const semver = require('semver');
const conventionalChangelog = require('conventional-changelog')

const DRY = !process.env.CI;

async function main(output) {
output('build_number', process.env.GITHUB_RUN_NUMBER);
}

main(core ? core.setOutput : (k, v) => {
console.log(k)
console.log(v)
});
6 changes: 6 additions & 0 deletions .github/actions/get-build-number/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"private": true,
"devDependencies": {
"@actions/core": "1.2.4"
}
}
30 changes: 30 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name-template: "v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- title: "🧰 Maintenance"
label:
- "chore"
- "refactor"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch
template: |
## Changes
$CHANGES
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ jobs:
- name: Install
run: |
npm ci
- name: Get Build Number
uses: ./.github/actions/get-build-number
id: vars
- name: Build
run: |
npm run build
npx electron-builder --publish=never
env:
BUILD_NUMBER: ${{ steps.vars.outputs.build_number }}
- name: Upload Build
uses: actions/upload-artifact@v2
with:
Expand Down

0 comments on commit 69d4ef5

Please sign in to comment.