-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(Probably) Add auto packaging script.
- Loading branch information
Showing
5 changed files
with
2,503 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: NodeJS with Webpack | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
run: | | ||
npm install | ||
grunt package | ||
- name: GH Release | ||
uses: softprops/action-gh-release@v0.1.7 | ||
with: | ||
files: | | ||
packaged/norna.mcpack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules | ||
scripts/** | ||
scripts/** | ||
norna.mcpack | ||
packaged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const webpackConfig = require('./webpack.config.js'); | ||
|
||
module.exports = function (grunt) { | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
webpack: { | ||
build: webpackConfig, | ||
watch: Object.assign({ watch: true }, webpackConfig), | ||
}, | ||
compress: { | ||
main: { | ||
options: { | ||
mode: "zip", | ||
archive: './packaged/norna.mcpack' | ||
}, | ||
files: [{ | ||
src: ["scripts", "scripts/**", "manifest.json", "pack_icon.png"] | ||
}] | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-webpack'); | ||
grunt.loadNpmTasks('grunt-contrib-compress') | ||
|
||
grunt.registerTask('build', ['webpack:build']) | ||
grunt.registerTask('install', ' Build and install the addon to the game\'s addon directory.', function () { | ||
grunt.task.run('webpack:build') | ||
}) | ||
grunt.registerTask('package', '', function () { | ||
grunt.task.run('webpack:build') | ||
grunt.task.run('compress:main') | ||
}) | ||
}; |
Oops, something went wrong.