-
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.
- Loading branch information
1 parent
2815726
commit 3bdaf8f
Showing
2 changed files
with
39 additions
and
0 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,2 @@ | ||
var fs = require('fs'); | ||
console.log(JSON.parse(fs.readFileSync('module.json', 'utf8')).version); |
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,37 @@ | ||
name: personal-markers CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get Version # Run the script that returns the version from `module.json` | ||
shell: bash | ||
id: get-version | ||
run: echo "::set-output name=version::$(node ./.github/workflows/get-version.js)" | ||
- run: zip -r ./personal-markers.zip module.json marker.js assets/ lang/ # Add folders/files here | ||
- name: Create Release # Create an additional release for this version | ||
id: create_versioned_release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
allowUpdates: true # set to false if you do not want to allow updates on existing releases | ||
name: Release ${{ steps.get-version.outputs.version }} # Use the version in the name | ||
draft: false | ||
prerelease: false | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
artifacts: './module.json,./personal-markers.zip' # don't forget to rename module zip thing | ||
tag: ${{ steps.get-version.outputs.version }} # Use the version as the tag | ||
- name: Create Release | ||
id: create_latest_release | ||
uses: ncipollo/release-action@v1 | ||
if: endsWith(github.ref, 'master') # Only update the latest release when pushing to the master branch | ||
with: | ||
allowUpdates: true | ||
name: Latest | ||
draft: false | ||
prerelease: false | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
artifacts: './module.json,./personal-markers.zip' # don't forget to rename module zip thing | ||
tag: latest |