Skip to content

Commit

Permalink
Add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rulio committed May 15, 2024
1 parent 420f748 commit d0c7ba2
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/check-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
pull_request:
branches:
- main

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: setup node
uses: actions/setup-node@main
with:
node-version-file: ".nvmrc"
- name: Install Application
run: npm clean-install
- name: Run Unit Tests
run: npm run test
- name: Read Version
id: getversion
run: echo "::set-output name=version::$(cat VERSION)"
- name: Validate Version remote
uses: wholestax/create-aliased-release@main
with:
validate-only: true
version: ${{ steps.getversion.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
push:
branches:
- main

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: setup node
uses: actions/setup-node@main
with:
node-version-file: ".nvmrc"
- name: Install Application
run: npm clean-install
- name: Run Unit Tests
run: npm run test
- name: Read Version
id: getversion
run: echo "::set-output name=version::$(cat VERSION)"
- name: Create Release Archive
uses: vimtor/action-zip@v1.2
with:
files: src/redirect.js
dest: release-${{ steps.getversion.outputs.version }}.zip
- name: Validate Version
uses: wholestax/create-aliased-release@main
with:
validate-only: false
version: ${{ steps.getversion.outputs.version }}
files: release-${{ steps.getversion.outputs.version }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.2
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d0c7ba2

Please sign in to comment.