Skip to content

Commit

Permalink
Pkg - Edit actions, add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
smastrom committed Nov 16, 2023
1 parent 7590094 commit 239e56a
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Chrome

on: [push]
on:
pull_request:
push:
branches:
- '*'
tags-ignore:
- '*'
workflow_call:

jobs:
cypress-ct:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Firefox

on: [push]
on:
pull_request:
push:
branches:
- '*'
tags-ignore:
- '*'
workflow_call:

jobs:
cypress-ct:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish to NPM

on:
push:
tags: ['v*']
workflow_dispatch:

jobs:
chrome-tests-workflow:
uses: ./.github/workflows/chrome-tests.yml
firefox-tests-workflow:
uses: ./.github/workflows/firefox-tests.yml
publish:
needs: [chrome-tests-workflow, firefox-tests-workflow]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Build package
run: npm install && npm run build
- name: Copy README and LICENSE
run: cp README.md LICENSE packages/vue-use-fixed-header
- name: Pack
run: cd packages/vue-use-fixed-header && rm -rf *.tgz && npm pack
- name: Publish
run: cd packages/vue-use-fixed-header && npm publish *.tgz --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![npm](https://img.shields.io/npm/v/vue-use-fixed-header?color=46c119) ![dependency-count](https://img.shields.io/badge/dependencies-0-success) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/smastrom/vue-use-fixed-header/chrome.yml?branch=main&label=chrome) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/smastrom/vue-use-fixed-header/firefox.yml?branch=main&label=firefox)
![npm](https://img.shields.io/npm/v/vue-use-fixed-header?color=46c119) ![dependency-count](https://img.shields.io/badge/dependencies-0-success) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/smastrom/vue-use-fixed-header/chrome-tests.yml?branch=main&label=chrome) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/smastrom/vue-use-fixed-header/firefox-tests.yml?branch=main&label=firefox)

# Vue Use Fixed Header

Expand All @@ -10,6 +10,16 @@ Turn your boring fixed header into a smart one with three lines of code.

<br />

## Release notes

`vue-use-fixed-header` is a package that I published on NPM some months ago as I needed something like it for my professional projects. Very soon I realized that it was too bloated and I decided to unpublish it (it had less than 50 weekly downloads).

This mostly because I realized that a lot of advanced functionalities I had implemented were unnecessary (e.g. scroll speed, scroll restoration) and that I could have achieved a good with a much simpler codebase.

I also wanted to include a streamlined API that will still work the moment `View Transitions` will be supported by all browsers and everything can be done with CSS.

<br />

## Features

- **Dead simple** - Write three lines of code and you're ready to go
Expand Down

0 comments on commit 239e56a

Please sign in to comment.