Skip to content

Commit b5e84e4

Browse files
committed
chore: use forked
1 parent fb65170 commit b5e84e4

File tree

17 files changed

+191
-15079
lines changed

17 files changed

+191
-15079
lines changed

.eslintrc.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/bundle-check.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

LICENSE

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

22
The MIT License (MIT)
33

4-
Copyright (c) 2019 REDDY PRASAD <[email protected]>
4+
Copyright (c) 2019-2024 REDDY PRASAD <[email protected]>
5+
Copyright (c) 2022-2024 Clement Tsang
6+
Copyright (c) 2025 Jen-Chieh Shen <[email protected]>
57

68
Permission is hereby granted, free of charge, to any person obtaining a copy
79
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 19 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,28 @@
1-
# --- WARNING - This GitHub Action will no longer be maintained ---
2-
The owner (dev-drprasad) and maintainer (thadguidry) do not see a need for continuing maintenance because the feature can now be handled directly with a line of code in your workflows with GitHub CLI [delete release](https://cli.github.com/manual/gh_release_delete).
3-
This repo thus will soon be archived.
4-
51
# GitHub Action: Delete tag and release
62

7-
## Usage
8-
Add following step to your workflow:
3+
Fork of the original that updates to Node 20.
94

10-
```yaml
11-
- uses: dev-drprasad/[email protected]
12-
with:
13-
tag_name: v0.1.2 #(required) - The name of the tag to delete. This is expected to be solely the tag name, not the name of a git reference.
14-
delete_release: true #(optional) default: true - also delete all releases and their assets that are associated to the tag name
15-
repo: <owner>/<repoName> #(optional) default: repo running this action - the target repository.
16-
github_token: ${{ secrets.GITHUB_TOKEN }} # (required) - a GitHub token with write access to the repo where tags and releases will be searched and deleted
17-
```
5+
**Note**: You may be able to skip using this if you are working on a GitHub-hosted runner,
6+
or you can install the `gh` tool, as `gh` now natively [can delete releases](https://cli.github.com/manual/gh_release_delete).
7+
For example:
188

19-
## Developing
20-
21-
You can follow these instructions to get this project cloned to your local machine and ready for development. Note that
22-
development requires at least [Node 20](https://nodejs.org/en/download) to be installed on your computer.
23-
24-
```shell
25-
git clone https://github.com/dev-drprasad/delete-tag-and-release.git
26-
cd delete-tag-and-release
27-
npm install
28-
```
29-
30-
Tests can be run via:
31-
32-
```shell
33-
npm test
34-
```
35-
36-
Since this is a repo for a [GitHub Action](https://docs.github.com/en/actions), **every new commit that changes code must include a new bundle.** You can
37-
generate a new bundle via running:
38-
39-
```shell
40-
npm run package
41-
```
42-
43-
and committing the resulting changes that will be in the `dist/` folder.
44-
45-
### Formatting and linting
46-
47-
This project uses [ESLint](https://eslint.org/) for linting and [Prettier](https://prettier.io/) for source code formatting. You can run the lint checks by running:
48-
49-
```shell
50-
npm run lint
51-
```
52-
53-
If you have lint errors that are automatically fixable, you can fix those by running:
54-
55-
```shell
56-
npm run lint:fix
9+
```yaml
10+
- name: Delete tag
11+
run: gh release delete $TAG --cleanup-tag
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5714
```
5815
59-
## Releasing
16+
---
6017
61-
Releases are done by creating a new tag and pushing that tag to the repo. A new
62-
release can be made via the following:
18+
Add the following step to your workflow:
6319
64-
```shell
65-
git checkout master
66-
git fetch
67-
git pull
68-
# choose either patch, minor, or major. See https://docs.npmjs.com/cli/v8/commands/npm-version#description for more info
69-
npm version <patch/minor/major>
70-
git push --follow-tags
20+
```yaml
21+
- uses: ClementTsang/[email protected]
22+
with:
23+
delete_release: true # default: false
24+
tag_name: v0.1.0 # tag name to delete
25+
repo: <owner>/<repoName> # target repo (optional). defaults to repo running this action
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7128
```
72-
73-
This will update the version in the `package.json`, create a new commit based off of the master branch, and create a
74-
new Git tag with that version that points to the new commit. Remember to use the `--follow-tags` flag when running
75-
`git push`! Without it, the new tag won't be pushed.
76-

action.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Delete tag and release - jcs
2-
description: delete tag and release
2+
description: An action to delete a tag, and optionally its associated release.
33
author: "Shen, Jen-Chieh"
44

55
branding:
@@ -8,19 +8,16 @@ branding:
88

99
inputs:
1010
tag_name:
11-
description: The name of the tag to delete.
12-
required: true
13-
github_token:
14-
description: A github token that has write access to the repo where the tag is.
11+
description: tag name
1512
required: true
1613
delete_release:
17-
description: Whether to delete all releases that correspond to the provided tag.
14+
description: whether to delete release or not
1815
required: false
19-
default: 'true'
16+
default: true
2017
repo:
21-
description: target repository as <owner>/<repository>. Defaults to the repo running this action.
18+
description: target repository as <owner>/<repository>
2219
required: false
2320

2421
runs:
25-
using: 'node20'
26-
main: 'dist/main.js'
22+
using: "node20"
23+
main: "index.js"

0 commit comments

Comments
 (0)