Skip to content

Test label #1

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

Merged
merged 2 commits into from
Jun 24, 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
57 changes: 36 additions & 21 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,47 @@
# 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://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

name: Release Device Farm to NPM
on:
release:
types: [created]
push:
branches:
- main
tags:
- '*.*.*'
pull_request:
types:
- labeled

jobs:
build:
release:
if: github.event.action != 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v2
# Get tag name.
- id: tag
uses: haya14busa/action-cond@v1
with:
node-version: 16
- run: npm ci
cond: "${{ startsWith(github.ref, 'refs/tags/') }}"
if_true: ${{ github.ref }}
if_false: ${{ steps.bumpr.outputs.next_version }}

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Release
uses: justincy/github-action-npm-release@2.0.2
id: release
- uses: actions/setup-node@v3
if: steps.release.outputs.released == 'true'
with:
registry-url: 'https://registry.npmjs.org'
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
- name: Publish
if: steps.release.outputs.released == 'true'
run: echo "//registry.npmjs.org/:_authToken=${{secrets.npm_token}}" > .npmrc && npm ci && npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}


release-check:
if: github.event.action == 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Post bumpr status comment
uses: haya14busa/action-bumpr@v1
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-release-github",
"version": "1.3.0",
"version": "1.3.1",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
Loading