Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Commit 8438c80

Browse files
committed
Initial
Bump prettier from 2.5.1 to 2.8.7 Bumps [prettier](https://github.com/prettier/prettier) from 2.5.1 to 2.8.7. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@2.5.1...2.8.7) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Bump typescript from 4.4.4 to 4.9.5 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.4.4 to 4.9.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v4.4.4...v4.9.5) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Bump eslint-plugin-jest from 25.3.2 to 27.2.1 Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 25.3.2 to 27.2.1. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](jest-community/eslint-plugin-jest@v25.3.2...v27.2.1) --- updated-dependencies: - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Bump @vercel/ncc from 0.31.1 to 0.36.1 Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.31.1 to 0.36.1. - [Release notes](https://github.com/vercel/ncc/releases) - [Commits](vercel/ncc@0.31.1...0.36.1) --- updated-dependencies: - dependency-name: "@vercel/ncc" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Bump @types/node from 18.11.0 to 18.15.11 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.11.0 to 18.15.11. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
1 parent 8716b80 commit 8438c80

19 files changed

+2221
-1128
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ updates:
33
- package-ecosystem: github-actions
44
directory: /
55
schedule:
6-
interval: daily
6+
interval: monthly
77

88
- package-ecosystem: npm
99
directory: /
1010
schedule:
11-
interval: daily
11+
interval: monthly

.github/workflows/check-dist.yml

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

.github/workflows/codeql-analysis.yml

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

.github/workflows/test.yml

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

CODEOWNERS

Lines changed: 0 additions & 1 deletion
This file was deleted.

LICENSE

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
1-
21
The MIT License (MIT)
32

4-
Copyright (c) 2018 GitHub, Inc. and contributors
3+
Copyright © 2023 Calvin A. Allen
54

6-
Permission is hereby granted, free of charge, to any person obtaining a copy
7-
of this software and associated documentation files (the "Software"), to deal
8-
in the Software without restriction, including without limitation the rights
9-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
copies of the Software, and to permit persons to whom the Software is
11-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
126

13-
The above copyright notice and this permission notice shall be included in
14-
all copies or substantial portions of the Software.
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
158

16-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22-
THE SOFTWARE.
9+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 29 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,39 @@
1-
<p align="center">
2-
<a href="https://github.com/actions/typescript-action/actions"><img alt="typescript-action status" src="https://github.com/actions/typescript-action/workflows/build-test/badge.svg"></a>
3-
</p>
1+
# calvinallen/action-vs-vsix-signer
42

5-
# Create a JavaScript Action using TypeScript
3+
Github Action to sign your Visual Studio extensions before you publish to the marketplace
64

7-
Use this template to bootstrap the creation of a TypeScript action.:rocket:
5+
## Usage
86

9-
This template includes compilation support, tests, a validation workflow, publishing, and versioning guidance.
7+
You can use the Visual Studio VSIX Signer GitHub Action by configuring a YAML-based workflow file, e.g. .github/workflows/deploy.yml.
108

11-
If you are new, there's also a simpler introduction. See the [Hello World JavaScript Action](https://github.com/actions/hello-world-javascript-action)
9+
> *This action only works on a Windows-based runner*
1210
13-
## Create an action from this template
11+
## Sign a local VSIX File
1412

15-
Click the `Use this Template` and provide the new repo details for your action
13+
```yml
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
1617

17-
## Code in Main
18-
19-
> First, you'll need to have a reasonably modern version of `node` handy. This won't work with versions older than 9, for instance.
20-
21-
Install the dependencies
22-
```bash
23-
$ npm install
24-
```
25-
26-
Build the typescript and package it for distribution
27-
```bash
28-
$ npm run build && npm run package
29-
```
30-
31-
Run the tests :heavy_check_mark:
32-
```bash
33-
$ npm test
34-
35-
PASS ./index.test.js
36-
✓ throws invalid number (3ms)
37-
wait 500 ms (504ms)
38-
test runs (95ms)
39-
40-
...
18+
- name: Visual Studio VSIX Signer
19+
uses: CalvinAllen/action-vs-vsix-signer@v1
20+
with:
21+
# REQUIRED
22+
sign-certificate-path: ./src/SigningCert.snk
23+
vsix-path: ./src/outputFolder/Extension.vsix
24+
sign-password: ${{ secrets.signpassword }}
25+
26+
# OPTIONAL
27+
vs-version: latest
28+
vs-prerelease: false
4129
```
4230
43-
## Change action.yml
44-
45-
The action.yml defines the inputs and output for your action.
46-
47-
Update the action.yml with your name, description, inputs and outputs for your action.
48-
49-
See the [documentation](https://help.github.com/en/articles/metadata-syntax-for-github-actions)
50-
51-
## Change the Code
52-
53-
Most toolkit and CI/CD operations involve async operations so the action is run in an async function.
54-
55-
```javascript
56-
import * as core from '@actions/core';
57-
...
58-
59-
async function run() {
60-
try {
61-
...
62-
}
63-
catch (error) {
64-
core.setFailed(error.message);
65-
}
66-
}
67-
68-
run()
69-
```
70-
71-
See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/README.md#packages) for the various packages.
72-
73-
## Publish to a distribution branch
74-
75-
Actions are run from GitHub repos so we will checkin the packed dist folder.
76-
77-
Then run [ncc](https://github.com/zeit/ncc) and push the results:
78-
```bash
79-
$ npm run package
80-
$ git add dist
81-
$ git commit -a -m "prod dependencies"
82-
$ git push origin releases/v1
83-
```
84-
85-
Note: We recommend using the `--license` option for ncc, which will create a license file for all of the production node modules used in your project.
86-
87-
Your action is now published! :rocket:
88-
89-
See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)
90-
91-
## Validate
92-
93-
You can now validate the action by referencing `./` in a workflow in your repo (see [test.yml](.github/workflows/test.yml))
94-
95-
```yaml
96-
uses: ./
97-
with:
98-
milliseconds: 1000
99-
```
100-
101-
See the [actions tab](https://github.com/actions/typescript-action/actions) for runs of this action! :rocket:
102-
103-
## Usage:
31+
## Inputs
10432
105-
After testing you can [create a v1 tag](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) to reference the stable and latest V1 action
33+
| Input | Required | Description |
34+
| --------------------- | -------- | -------------------------------------------------------------------------------------------------------------------- |
35+
| sign-password | Y | Your password to utilize the supplied signing certificate |
36+
| sign-certificate-path | Y | Path to the certificate used to sign the VSIX file |
37+
| vsix-path | Y | Path to the local VSIX package you wish to publish |
38+
| vs-version | N | Specify the exact version of Visual Studio tooling to use; default to `latest` |
39+
| vs-prerelease | N | Allow a pre-release installation of Visual Studio tooling; default to `false` |

__tests__/main.test.ts

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,8 @@
1-
import {wait} from '../src/wait'
21
import * as process from 'process'
32
import * as cp from 'child_process'
43
import * as path from 'path'
54
import {expect, test} from '@jest/globals'
65

7-
test('throws invalid number', async () => {
8-
const input = parseInt('foo', 10)
9-
await expect(wait(input)).rejects.toThrow('milliseconds not a number')
10-
})
11-
12-
test('wait 500 ms', async () => {
13-
const start = new Date()
14-
await wait(500)
15-
const end = new Date()
16-
var delta = Math.abs(end.getTime() - start.getTime())
17-
expect(delta).toBeGreaterThan(450)
18-
})
19-
20-
// shows how the runner will run a javascript action with env / stdout protocol
21-
test('test runs', () => {
22-
process.env['INPUT_MILLISECONDS'] = '500'
23-
const np = process.execPath
24-
const ip = path.join(__dirname, '..', 'lib', 'main.js')
25-
const options: cp.ExecFileSyncOptions = {
26-
env: process.env
27-
}
28-
console.log(cp.execFileSync(np, [ip], options).toString())
29-
})
6+
test('true', async () => {
7+
expect(true).toBeTruthy();
8+
});

action-types.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
inputs:
2+
sign-password:
3+
type: string
4+
sign-certificate-path:
5+
type: string
6+
vsix-path:
7+
type: string
8+
vs-version:
9+
type: string
10+
vs-prerelease:
11+
type: boolean

0 commit comments

Comments
 (0)