Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ardittristan committed Jul 23, 2020
1 parent 2815726 commit 3bdaf8f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/get-version.js
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);
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
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

0 comments on commit 3bdaf8f

Please sign in to comment.