Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from Travis to GitHub Actions #3

Merged
merged 12 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Grunt build

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18

- name: Build
run: |
npm install
grunt
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Grunt release minified

on:
push:
branches: [ "master" ]
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18

- name: Build
run: |
npm install
grunt

- name: Push
run: |
git config user.name github-actions
git config user.email [email protected]
git checkout ${{ github.event.pull_request.head.ref || github.head_ref || github.ref_name }}
git commit -a -m "Committed by GitHub Actions [ci skip]"
git push
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules/
package-lock.json
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

5 changes: 1 addition & 4 deletions GruntFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = function (grunt) {
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> v<%= pkg.version %> | <%= pkg.license %> license | <%= pkg.homepage %> */\n'
banner: '/*! <%= pkg.name %> v<%= pkg.version %> | <%= pkg.license %> license | <%= pkg.homepage %> 🚀 */\n'
},
dist: {
src: 'attach.js',
Expand All @@ -63,7 +63,4 @@ module.exports = function (grunt) {

grunt.registerTask('test', ['jshint']);
grunt.registerTask('default', ['test', 'uglify', 'clean']);

//This is an extra task incase we want to do something different with Travis CI
grunt.registerTask('travis', ['jshint', 'uglify', 'clean']);
};
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Attach.js [![NPM](https://nodei.co/npm/attach.js.png?mini=true)](https://nodei.co/npm/attach.js/) [![Build Status](https://travis-ci.org/nicbell/attach.js.png?branch=master)](https://travis-ci.org/nicbell/attach.js) [![Downloads](https://img.shields.io/npm/dt/attach.js.svg)](https://www.npmjs.com/package/attach.js)
# Attach.js [![NPM](https://nodei.co/npm/attach.js.png?mini=true)](https://nodei.co/npm/attach.js/) [![Build Status](https://github.com/nicbell/attach.js/actions/workflows/check.yml/badge.svg)](https://github.com/nicbell/attach.js/actions) [![Downloads](https://img.shields.io/npm/dt/attach.js.svg)](https://www.npmjs.com/package/attach.js)

Attach.js removes dependancy on messy CSS selectors when attaching JavaScript to the page. Attach.js also encapsulates all your DOM "attachments" so that they can easily be reattached when the page is dynamically updated (ie. via AJAX).

Expand Down
2 changes: 1 addition & 1 deletion attach.min.js

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