Skip to content

Commit

Permalink
switch to github as main hosting provider
Browse files Browse the repository at this point in the history
  • Loading branch information
hall committed Jan 11, 2023
1 parent a33f07a commit 26780ef
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 174 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Main
on:
pull_request:
push:
jobs:
main:
runs-on: ubuntu-latest
steps:

- name: checkout repo
uses: actions/checkout@v3

- name: install nix
uses: cachix/install-nix-action@v18

- name: check flake
run: nix flake check

- name: build package
id: package
run: |
nix build
echo ::set-output name=path::result/*.vsix
- name: get latest tag
id: latest
run: echo ::set-output name=version::$(git describe --abbrev=0 --tags --match 'v[0-9]*\.[0-9]*\.[0-9]*' | cut -c2-)

- name: parse changelog
id: changelog
uses: coditory/changelog-parser@v1

- name: create release
uses: softprops/action-gh-release@v1
if: github.ref == 'refs/heads/main' && steps.changelog.outputs.version != steps.latest.outputs.version
with:
files: ${{ steps.package.outputs.path }}
body: ${{ steps.changelog.outputs.description }}
tag_name: ${{ steps.changelog.outputs.version }}

- name: publish to Open VSX
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPENVSX_ACCESS_TOKEN }}
extensionFile: ${{ steps.package.outputs.path }}

- name: publish to VS Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.AZURE_ACCESS_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.package.outputs.path }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ test/resources/assets
test-results.xml
index.scip

.direnv/
.direnv/
result
129 changes: 0 additions & 129 deletions .gitlab-ci.yml

This file was deleted.

6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 15 additions & 37 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,22 @@
inputs.utils.lib.eachDefaultSystem (system:
let pkgs = inputs.nixpkgs.legacyPackages.${system}; in
{
devShell = (pkgs.buildFHSUserEnvBubblewrap {
name = "fhs";
runScript = "bash";
targetPkgs = pkgs: with pkgs; [
# dev
nodejs
gitlab-runner

# test
alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
dbus
expat
gdk-pixbuf
glib
gtk3
libdrm
libxkbcommon
mesa
nspr
nss
pango
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
xorg.libxcb

libdbusmenu
(lib.getLib systemd)
fontconfig.lib
packages.default = pkgs.buildNpmPackage {
name = "draw";
src = ./.;
npmDepsHash = "sha256-/aW1tyzE6WK4zBAOep4BhBM4W6/ZjpoBEpZ50eMVnM4=";
nativeBuildInputs = with pkgs; [
pkg-config
python3
];
buildInputs = with pkgs; [
libsecret
];
}).env;

installPhase = ''
mkdir -p $out
cp ./*.vsix $out/
'';
};
});
}
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"icon": "docs/images/icon.png",
"license": "Apache-2.0",
"repository": {
"url": "https://gitlab.com/hall/draw"
"url": "https://github.com/hall/draw"
},
"bugs": {
"url": "https://gitlab.com/hall/draw/issues"
"url": "https://github.com/hall/draw/issues"
},
"engines": {
"vscode": "^1.53.0"
Expand Down Expand Up @@ -94,7 +94,7 @@
"draw.buttons": {
"type": "array",
"default": [],
"markdownDescription": "Add [custom buttons](https://gitlab.com/hall/draw#custom-buttons) to the toolbar",
"markdownDescription": "Add [custom buttons](https://github.com/hall/draw#custom-buttons) to the toolbar",
"items": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -133,7 +133,8 @@
"package": "webpack --mode production --devtool hidden-source-map",
"lint": "eslint . --ext .ts,.tsx",
"pretest": "tsc -p ./",
"test": "extest setup-and-run ./out/**/*.test.js"
"test": "extest setup-and-run ./out/**/*.test.js",
"build": "npx vsce package"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.1.1",
Expand Down

0 comments on commit 26780ef

Please sign in to comment.