Skip to content

Commit

Permalink
Add publish and ci workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sebamarynissen committed Jun 1, 2024
1 parent a49e750 commit 359c581
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI

on: pull_request

jobs:
test-node:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish

on:
release:
types: [created]

jobs:
publish-npm:
name: Publish to npm
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: npm
- run: npm install -g npm@latest
- run: npm i
- run: npm test
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm whoami; npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "@whisthub/vue-i18n",
"version": "0.0.1-alpha",
"version": "0.0.0",
"private": false,
"type": "module",
"description": "Simple internationalization plugin for Vue, modeled after vue-i18n, but usable with both the options api and composition api in the same project.",
"main": "lib/index.js",
"exports": {
Expand Down Expand Up @@ -30,7 +32,6 @@
"url": "https://github.com/whisthub/vue-i18n/issues"
},
"homepage": "https://github.com/whisthub/vue-i18n#readme",
"type": "module",
"devDependencies": {
"@vue/test-utils": "^2.4.6",
"@whisthub/eslint-config": "^3.0.0",
Expand Down

0 comments on commit 359c581

Please sign in to comment.