Skip to content

Commit

Permalink
Trying GitHub Packages action
Browse files Browse the repository at this point in the history
  • Loading branch information
medilies committed Jul 5, 2022
1 parent 5b2dd05 commit be71f6e
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 35 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/main.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm test

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@medilies:registry=https://npm.pkg.github.com
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Countdown JS
# Countdown Component JS

A simple and lightweight library for adding coundowns to the frontend in declarative way.

Expand Down Expand Up @@ -36,7 +36,7 @@ Write a `div` or many with the following attributes.
| Attribute | Description | |
| ------------------- | ------------------------------------------------------------------------------------------------- | ----------- |
| autoCountdown | Starts the countdown on page load | Requried |
| countdown-duration | Sets the coundown duration (an integer in seconds) | Required |
| countdown-duration | Sets the countdown duration (an integer in seconds) | Required |
| countdown-format | Sets the display format (see the formatting table) | Required |
| countdown-tick-size | Sets the update interval size (a timespan) | Default: 1s |
| countdown-handler | Takes as value the name the function you defined to call as an action in the end of the countdown | Optional |
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
{
"name": "@medilies/countdown-component",
"version": "1.0.1",
"version": "0.1.0",
"description": "A simple and lightweight library for adding coundowns to the frontend.",
"main": "./lib/countdownComponent.js",
"files": [
"lib"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/medilies/countdown-component.js.git"
},
"publishConfig": {
"@medilies:registry": "https://npm.pkg.github.com"
},
"keywords": [
"countdown",
"vanilla",
"component",
"html"
],
"author": "medilies <medilies.contact@gmail.com>",
"license": "ISC",
"license": "MIT",
"bugs": {
"url": "https://github.com/medilies/countdown-component.js/issues"
},
Expand Down

0 comments on commit be71f6e

Please sign in to comment.