diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f9c81dc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + branches: [master] + tags: ['v*'] + pull_request: + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + - run: npm ci + - run: make lint + - run: make build + - name: Verifica cabeçalho do userscript + run: head -1 dist/burlesco.user.js | grep -qx '// ==UserScript==' + - name: Publica release + if: startsWith(github.ref, 'refs/tags/v') + env: + GH_TOKEN: ${{ github.token }} + run: gh release create "$GITHUB_REF_NAME" dist/burlesco.user.js --title "$GITHUB_REF_NAME" --generate-notes diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8e4ebdb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: node_js -dist: trusty -node_js: - - "11" -install: - - npm install -g eslint -script: - - make lint -before_deploy: - - make build -deploy: - - provider: releases - skip_cleanup: true - api_key: - secure: KI+ygLjvGfAJaZsPw20gB35iDH+q1AAIK5OJ1khIc52GSW6P+d6ORU/nTRdysFjmaB4cfDpkjO1rCdwa6Ge4eOCXMY9E3/mS7ZxRY94PT9hELVoNnqiEK/Z4UnrNdrJgBTt7By7R3o5O4hrihGHSbfAqHmbKSg53Xs5BaEW+fOVr36vQYsx3WhK1RhfCh369WWnR0cHqGsaYSfwwkeSLBU6nzmuzivsUwOjxVoX21f8U25c2/rDJzcQ7yjc5STBjYwrnm4Kj/vJyleMP8J78k0Bt3k05O4NOBHwuGSSyC7iSX4SAisjO+dA8a6LfOgKFZXPfjfqI+xOKMdY96Ytlj3hPNe/y1vgWR+FDSV59sdV5XNzlm9MnXKlcTZGzs1bPl1l0oLil6B5cxGnnG3IxsAlEW2QPL8BXzkc+BGqWkoUa1DpPpA0i6H++bHSvFzHtwyS5JzxME8kOI/Go6Ly9ODA9+7F4tgfOQuhtsYbxZG/B6rIhAfiAcqU3MmwaRYcvX64+BosJ0e/gwDF6H5cd6LtTKz+BA3E/9vrtRyBqaxNVJJOpOBMy+GqpORO6i3wO3h1KDvpqqBo8BrXnbotJA6n9DEzKp7GXSzik5lKDLn1iK5sAHzgK2BZf23vsS/0odHboAHvMsV64jLxmQZvMtDgKqe0dzkbrIKdWROIpo6c= - file: - - dist/burlesco.user.js - on: - branch: master - tags: true diff --git a/Makefile b/Makefile index 6867d23..7873bc2 100644 --- a/Makefile +++ b/Makefile @@ -8,4 +8,4 @@ lint: npx eslint src/burlesco.user.js build: clean mkdir -p "$(DIST_DIR)" - python3 build.py src/burlesco.user.js > "$(DIST_DIR)/burlesco.user.js" + python3 build.py src/burlesco.user.js diff --git a/src/burlesco.user.js b/src/burlesco.user.js index 782e17e..09b5e34 100644 --- a/src/burlesco.user.js +++ b/src/burlesco.user.js @@ -1,10 +1,12 @@ // ==UserScript== // @name Burlesco // @namespace https://burles.co/ -// @version 13.1 +// @version 14.1 // @description Leia notícias sem ser assinante, burle o paywall // @author rodorgas & AugustoResende // @supportURL https://burles.co +// @updateURL https://github.com/burlesco/userscript/releases/latest/download/burlesco.user.js +// @downloadURL https://github.com/burlesco/userscript/releases/latest/download/burlesco.user.js // @icon https://raw.githubusercontent.com/burlesco/site/master/logo_semfundo.png // Atenção: Caso algum site não funcione logo após a instalação, limpe o cache do navegador. // @grant GM_webRequest