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
88 changes: 62 additions & 26 deletions .github/workflows/nodejs-ci.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,73 @@
# CI for command line NodeJS Applications
name: nodejs
name: CI

on:
push:
paths:
- "**/**"
- "!**/*.md/**"

env:
CI: true
FORCE_COLOR: 2
branches:
- master
pull_request:

jobs:
run:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: ["14"]
os: ["ubuntu-latest"]
build-test-verify:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v2.3.4
- name: Record start time
id: record_time
run: |
echo "BUILD_START=$(date +%s)" >> $GITHUB_ENV

- name: Set up Node.js
uses: actions/setup-node@v2.1.5
- name: Checkout repository
id: checkout
uses: actions/checkout@v4

- name: Setup Node.js
id: setup_node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
node-version: 16

- name: Install npm dependencies
- name: Cache node modules
id: cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install dependencies
id: install_deps
run: npm install

- name: Run build
run: npm run ci
- name: Run tests
id: test
run: npm test

- name: Package and Verify VSCode Theme
id: package
run: npx vsce package

- name: Post PR Comment with Build Time and Test Success
if: github.event_name == 'pull_request'
id: post_comment
uses: actions/github-script@v6
with:
script: |
// Get the start time from the environment variable
const buildStart = parseInt(process.env.BUILD_START);
const buildEnd = Math.floor(Date.now() / 1000);
const buildDuration = buildEnd - buildStart;
const commentBody = `✅ Build succeeded in ${buildDuration} seconds. All tests passed.`;
// Extract PR number from the GITHUB_REF (e.g. refs/pull/123/merge)
const prNumberMatch = process.env.GITHUB_REF.match(/refs\/pull\/(\d+)\/merge/);
if (prNumberMatch) {
const prNumber = parseInt(prNumberMatch[1], 10);
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: commentBody
});
} else {
console.log("Not a pull request event. No comment posted.");
}
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
on: workflow_dispatch

name: Publish VS Code Extension to Microsoft Marketplace and Open VSX
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 'Install nodejs 20'
uses: actions/setup-node@v
with:
node-version: '20'
# Run install dependencies
- name: Install dependencies
run: |
npm install
# Run tests
- name: Build
run: npm run build
- name: Get current package version
id: package_version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: Check version is mentioned in Changelog
uses: mindsers/changelog-reader-action@v2.2.3
with:
version: ${{ steps.package_version.outputs.current-version }}
path: 'CHANGELOG.md'
- name: Create a Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name : ${{ steps.package_version.outputs.current-version}}
release_name: ${{ steps.package_version.outputs.current-version}}
body: Publish ${{ steps.package_version.outputs.current-version}}
- name: Publish extension to Visual Studio Marketplace
id: create_vsix
uses: HaaLeo/publish-vscode-extension@v2
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
- name: Publish extension to Open VSX
uses: HaaLeo/publish-vscode-extension@v2
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
extensionFile: ${{ steps.create_vsix.outputs.vsixPath }}
packagePath: ''
- name: Generate checksums
run: find dist/ -name "*.vsix" -type f -exec sha256sum {} \; > dist/checksums.sha256

- name: Attach vsix to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.create_vsix.outputs.vsixPath}}
asset_name: ${{ steps.create_vsix.outputs.vsixPath}}
asset_content_type: application/vsix
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"files.trimTrailingWhitespace": true,
"gitlens.advanced.blame.customArguments": ["--ignore-revs-file", ".gitignore-revs"]
"gitlens.advanced.blame.customArguments": [
"--ignore-revs-file",
".gitignore-revs"
],
"wake.compiler.solc.remappings": []
}
72 changes: 72 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
### Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v1.6.0](https://github.com/contractshark/vscode-solidity-extension/compare/v1.5.0...v1.6.0)

> 2 January 2023

- Release: Yul support [`#12`](https://github.com/contractshark/vscode-solidity-extension/pull/12)

#### [v1.5.0](https://github.com/contractshark/vscode-solidity-extension/compare/v1.4.0...v1.5.0)

> 21 July 2022

- feat: support for unbalancedBracketScopes and balancedBracketScopes [`#10`](https://github.com/contractshark/vscode-solidity-extension/pull/10)
- fix syntax highlighting for `!` and `!=` [`#9`](https://github.com/contractshark/vscode-solidity-extension/pull/9)

#### [v1.4.0](https://github.com/contractshark/vscode-solidity-extension/compare/v1.3.0...v1.4.0)

> 20 March 2022

- feat(natspec): support for @custom and updates to grammar [`#7`](https://github.com/contractshark/vscode-solidity-extension/pull/7)
- v1.3.0 [`#5`](https://github.com/contractshark/vscode-solidity-extension/pull/5)
- docs(readme): open vsx registry [`cb5af4c`](https://github.com/contractshark/vscode-solidity-extension/commit/cb5af4ce902e1169e5d6bc52852ab5a3d34ee10d)

#### [v1.3.0](https://github.com/contractshark/vscode-solidity-extension/compare/v1.2.1...v1.3.0)

> 1 October 2021

- v1.2.0 [`#3`](https://github.com/contractshark/vscode-solidity-extension/pull/3)
- v1.1.0 [`#2`](https://github.com/contractshark/vscode-solidity-extension/pull/2)
- bug/vscode [`#1`](https://github.com/contractshark/vscode-solidity-extension/pull/1)
- feat(vscode): release v1.3.0 [`3f15e3c`](https://github.com/contractshark/vscode-solidity-extension/commit/3f15e3c4b014db649c219756b1669dd8743adc5d)
- Release 1.2.1 [`020ef3b`](https://github.com/contractshark/vscode-solidity-extension/commit/020ef3bb5fdf77966db1ce3e9b12016bb8d7f21c)
- chore(package): pin dependencies, fix git url [`86a55c8`](https://github.com/contractshark/vscode-solidity-extension/commit/86a55c8b74248c25f7d6524ad49bd60b50133d8c)

#### [v1.2.1](https://github.com/contractshark/vscode-solidity-extension/compare/v1.2.0...v1.2.1)

> 17 August 2021

#### [v1.2.0](https://github.com/contractshark/vscode-solidity-extension/compare/v1.1.0...v1.2.0)

> 17 August 2021

- feat(release): EIP1559 support [`4353981`](https://github.com/contractshark/vscode-solidity-extension/commit/43539818462f5b6d5c0b3a6cb3bd0ac992020387)
- Release 1.2.1 [`16f05e8`](https://github.com/contractshark/vscode-solidity-extension/commit/16f05e8020e8bd8581e67853ab6327879cb12eba)

#### [v1.1.0](https://github.com/contractshark/vscode-solidity-extension/compare/v1.0.1...v1.1.0)

> 30 July 2021

- feat(release): v1.1.0 [`efbb953`](https://github.com/contractshark/vscode-solidity-extension/commit/efbb9534d220bbe9efc94a3f296376a88e65bfb5)
- feat(vscode): inital theme overlay [`d11ba45`](https://github.com/contractshark/vscode-solidity-extension/commit/d11ba45b0382e88e3f8c5f38f96242095f1c178b)
- docs(readme): v1.0.0 [`60295d7`](https://github.com/contractshark/vscode-solidity-extension/commit/60295d7b5fc3cdc54f9c5595e5c1e55d01b07e93)

### [v1.0.1](https://github.com/contractshark/vscode-solidity-extension/compare/v0.0.2...v1.0.1)

> 15 April 2021

- test(validate): validate grammar [`d7b281a`](https://github.com/contractshark/vscode-solidity-extension/commit/d7b281a6b1b570cf8afc1b1eae0f1c253de2b6d8)
- fix(ext): url update and CI [`bc29fe5`](https://github.com/contractshark/vscode-solidity-extension/commit/bc29fe53de67ade1058c62285194d691ed488d7f)
- docs(readme): vscode ext [`33d1c37`](https://github.com/contractshark/vscode-solidity-extension/commit/33d1c3731c4f02419a7a9b4cd60d13723e63eaf6)

#### v0.0.2

> 14 April 2021

- release [`06906dc`](https://github.com/contractshark/vscode-solidity-extension/commit/06906dc5dffabb815395d29c9643bf9ff5c86f9e)
- chore(release): 0.0.2 [`c8c2741`](https://github.com/contractshark/vscode-solidity-extension/commit/c8c274182f95fa7d9a9d544857ac4aa58405dc9e)
- build(vsce): package [`aec374a`](https://github.com/contractshark/vscode-solidity-extension/commit/aec374ac38ab110046f018e914fb4b39bb7931e5)
1 change: 0 additions & 1 deletion dist/SHA256SUM.txt

This file was deleted.

1 change: 1 addition & 0 deletions dist/checksums.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f2f534687fd899bee5232cb11e973e6a67a0397258358544d63a4e5f6f0f38a8 dist/solidity-lang-2.0.0.vsix
Loading
Loading