Skip to content
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
44 changes: 24 additions & 20 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ on:

permissions:
contents: write
packages: write

jobs:
release:
name: Release Version
name: Create Release
runs-on: ubuntu-latest

# Only run this job if one of the following is true:
# - It was done manually.
# - A non-fork, non-Dependabot PR was merged.
# - It was run manually.
# - A PR was merged that was not from Dependabot or a fork.
if: |
github.event_name == 'workflow_dispatch' ||
(
Expand All @@ -28,13 +27,15 @@ jobs:
github.event.pull_request.head.repo.fork == false
)

outputs:
tag: v${{ steps.tag.outputs.version }}

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-tags: true
token: ${{ secrets.GITHUB_TOKEN }}

- name: Tag
id: tag
Expand All @@ -50,8 +51,8 @@ jobs:
with:
tag: v${{ steps.tag.outputs.version }}

publish-github:
name: Publish to GitHub Packages
publish-npm:
name: Publish to npm
runs-on: ubuntu-latest

needs: release
Expand All @@ -63,28 +64,31 @@ jobs:
with:
fetch-tags: true

- name: Setup Node.js (npm)
id: setup-node-npm
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
registry-url: https://registry.npmjs.org
node-version-file: .node-version
registry-url: https://registry.npmjs.org/

- name: Install Dependencies
id: install
run: npm ci

- name: Setup Node.js (gh-pkg)
id: setup-node-gh
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
registry-url: https://npm.pkg.github.com
- name: Test
id: test
run: npm ci-test

- name: Update npm Version
id: version
run:
npm version ${{ needs.release.outputs.tag }} --git-tag-version false

- name: Publish
id: publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm publish
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm whoami
npm publish --ignore-scripts --access public
5 changes: 1 addition & 4 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Continuous Integration

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand All @@ -28,7 +25,7 @@ jobs:
id: setup-node
uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: .node-version
cache: npm

- name: Install Dependencies
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
lint:
Expand All @@ -29,7 +26,7 @@ jobs:
id: setup-node
uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: .node-version
cache: npm

- name: Install Dependencies
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,7 @@ For additional information about transpiled action code, see

## Installation

### Option 1: Install from GitHub Packages

1. [Authenticate to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)

```bash
$ npm login --registry=https://npm.pkg.github.com
Username: <your username>
Password: <your personal access token>
```
### Option 1: Install from npm

1. Install via `npm`

Expand Down
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.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@github/local-action",
"description": "Local Debugging for GitHub Actions",
"version": "1.3.0",
"version": "1.4.0",
"author": "Nick Alteen <ncalteen@github.com>",
"private": false,
"homepage": "https://github.com/github/local-action",
Expand All @@ -26,9 +26,6 @@
"bin": {
"local-action": "./bin/local-action"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"scripts": {
"ci-test": "NODE_OPTIONS=\"$NODE_OPTIONS --no-warnings --experimental-vm-modules\" jest --ci --reporters=default --reporters=jest-junit --no-cache",
"coverage": "npx make-coverage-badge --output-path ./badges/coverage.svg",
Expand Down