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
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.git
.idea
coverage
dist
lib
node_modules
*.log
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

26 changes: 0 additions & 26 deletions .eslintrc.json

This file was deleted.

26 changes: 12 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: 'CI'

on:
pull_request:
push:
branches-ignore:
- master
Expand All @@ -10,22 +11,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Use Node.js 24
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}

- name: Cache dependencies
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
node-version-file: .nvmrc
cache: npm

- name: Install dependencies
run: npm ci
Expand All @@ -38,3 +30,9 @@ jobs:

- name: Run unit tests
run: npm test

- name: Audit production dependencies
run: npm run audit:prod

- name: Build and package action
run: npm run build && npm run package
20 changes: 12 additions & 8 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/checkout@v6

- name: Use Node.js 24
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: npm

- name: Install dependencies
run: npm ci

Expand All @@ -22,15 +28,13 @@ jobs:
- name: Run tests
run: npm run test:coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
yml: codecov.yml
token: ${{ secrets.CODECOV_TOKEN }}
- name: Audit production dependencies
run: npm run audit:prod

- name: Ensure build & shrinkwrap work
run: npm run build && npm run package


- name: Bump version
id: bump_version
uses: 'phips28/gh-action-bump-version@master'
Expand All @@ -48,4 +52,4 @@ jobs:
tag_name: ${{ steps.bump_version.outputs.newTag }}
release_name: ${{ steps.bump_version.outputs.newTag }}
draft: false
prerelease: false
prerelease: false
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint && npm run format
3 changes: 0 additions & 3 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test && npm run typecheck
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
24
22 changes: 13 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
FROM node:14.21-slim
FROM node:24-slim

LABEL "com.github.actions.name"="Automated version bump for Android apps."
LABEL "com.github.actions.description"="Automated version bump for Android apps."
LABEL "com.github.actions.icon"="chevron-up"
LABEL "com.github.actions.color"="blue"

RUN apt-get update
RUN apt-get install -y git
RUN apt-get update \
&& apt-get install -y --no-install-recommends git \
&& rm -rf /var/lib/apt/lists/*

COPY . .
WORKDIR /action

COPY package.json package-lock.json ./
RUN HUSKY=0 npm ci

RUN npm ci
RUN npm run build
RUN npm run package
RUN npm prune --production
COPY . .
RUN npm run build \
&& npm run package \
&& npm prune --omit=dev

ENTRYPOINT ["node", "/dist/index.js"]
ENTRYPOINT ["node", "/action/dist/index.js"]
11 changes: 0 additions & 11 deletions codecov.yml

This file was deleted.

35 changes: 35 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import eslintConfigPrettier from 'eslint-config-prettier';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';

export default [
{
ignores: [
'coverage/**',
'dist/**',
'e2e/**',
'lib/**',
'node_modules/**',
],
},
{
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
project: './tsconfig.json',
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': tsPlugin,
},
rules: {
...tsPlugin.configs.recommended.rules,
...eslintConfigPrettier.rules,
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},
];
18 changes: 13 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@ module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
testMatch: ['<rootDir>/src/**/*.test.ts'],
transform: {
'^.+\\.ts$': 'ts-jest'
'^.+\\.ts$': [
'@swc/jest',
{
jsc: {
parser: { syntax: 'typescript' },
target: 'es2022',
},
module: { type: 'commonjs' },
},
],
},
verbose: true
}
verbose: true,
};
Loading