Skip to content

Commit

Permalink
Chore clean-ups / update dependencies (#3)
Browse files Browse the repository at this point in the history
- Clean-up action/workflows, editorconfig, action.yml (align with other
  repos)
- Format files
- Update license date
- Update dependencies
  • Loading branch information
paescuj authored Jan 12, 2025
1 parent d70f7d4 commit 707b830
Show file tree
Hide file tree
Showing 18 changed files with 659 additions and 884 deletions.
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true

[*.{mjs,cjs,js,mts,cts,ts,json,vue,html,scss,css,toml,md}]
[*.{mjs,cjs,js,mts,cts,ts,json,vue,html,scss,css,toml}]
indent_style = tab

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_style = space

[*.md]
trim_trailing_whitespace = false
11 changes: 4 additions & 7 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ runs:
with:
node-version-file: package.json

- uses: pnpm/action-setup@v4
name: Setup pnpm
id: pnpm-install
with:
run_install: false
- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm cache dir
id: pnpm-cache-dir
shell: bash
run: echo "pnpm-cache-dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
name: Setup pnpm cache
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache-dir.outputs.pnpm-cache-dir }}
key:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ on:
branches:
- main

permissions:
contents: write

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
required: true
type: string

permissions:
contents: write

jobs:
check-version:
name: Check Version
Expand All @@ -29,8 +26,10 @@ jobs:

create-version:
name: Create Version
runs-on: ubuntu-latest
needs: check-version
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -50,7 +49,7 @@ jobs:
- name: Create version commit & tags
run: |
author='${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>'
author='${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>'
version='v${{ needs.check-version.outputs.version }}'
majorVersion='v${{ needs.check-version.outputs.major-version }}'
branch='${{ github.ref }}'
Expand All @@ -63,7 +62,7 @@ jobs:
git tag --annotate "$version" --message "$version"
git push --atomic origin "$branch" "$version"
git push --atomic origin "$branch" "refs/tags/${version}"
if [ "$isPrerelease" = false ]; then
git tag --force --annotate "$majorVersion" --message "$majorVersion"
Expand All @@ -72,10 +71,12 @@ jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
needs:
- check-version
- create-version
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
5 changes: 2 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: Close Stale Issues
description: Close issues certain days after a stale label has been added
author: Directus

branding:
icon: calendar
color: red

inputs:
github-token:
required: true
description: GitHub token with read access and issue update access to github-repo
description: GitHub token with read and issue update access to github-repo
default: ${{ github.token }}
github-repo:
required: true
Expand All @@ -23,7 +22,7 @@ inputs:
description: Days before an issue is closed after the stale label has been added to it
close-message:
required: true
description: Message which will be added to issues when closing
description: Message on the staled issues when closing
dry-run:
description: Run the action without effectively closing stale issues
default: 'false'
Expand Down
77 changes: 39 additions & 38 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion license
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Directus
Copyright (c) 2025 Directus

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "module",
"packageManager": "pnpm@9.7.1",
"packageManager": "pnpm@9.15.3",
"engines": {
"node": "20",
"pnpm": "9"
Expand All @@ -13,14 +13,14 @@
"test": "vitest --watch=false"
},
"devDependencies": {
"@actions/core": "1.10.1",
"@actions/core": "1.11.1",
"@actions/github": "6.0.0",
"@directus/eslint-config": "link:../eslint-config",
"@directus/tsconfig": "2.0.0",
"@directus/tsconfig": "3.0.0",
"dayjs": "1.11.13",
"eslint": "9.9.0",
"tsup": "8.2.4",
"typescript": "5.5.4",
"vitest": "2.0.5"
"eslint": "9.18.0",
"tsup": "8.3.5",
"typescript": "5.7.3",
"vitest": "2.1.8"
}
}
Loading

0 comments on commit 707b830

Please sign in to comment.