Skip to content
Open
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
39 changes: 39 additions & 0 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deno CI
on:
push:
branches:
- main
jobs:
release:
name: Release
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 18.15.0
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Install dependencies
run: npm install
- name: Compile Windows
run: deno compile -A --target x86_64-pc-windows-msvc --output ./dist/windows/arcctl main.ts
- name: Compile Linux
run: deno compile -A --target x86_64-unknown-linux-gnu --output ./dist/linux/arcctl main.ts
- name: Compile OSX Amd64
run: deno compile -A --target x86_64-apple-darwin --output ./dist/osx-amd64/arcctl main.ts
- name: Compile OSX Arm64
run: deno compile -A --target aarch64-apple-darwin --output ./dist/osx-arm64/arcctl main.ts
- name: Release
run: npx semantic-release --debug
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/lib
/tmp
/bin/arcctl
dist
node_modules
oclif.manifest.json
coverage
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@
"version": "oclif readme && git add README.md",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
}
}
}
65 changes: 16 additions & 49 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -1,82 +1,49 @@
const { GIT_BRANCH: branch } = process.env;

const commitAnalyzer = '@semantic-release/commit-analyzer';
const releaseNotesGenerator = '@semantic-release/release-notes-generator';
const git = [
'@semantic-release/git',
{
assets: [
'assets': [
'CHANGELOG.md',
'README.md',
'package.json',
'package-lock.json',
'yarn.lock',
],
},
];
const exec = [
'@semantic-release/exec',
{
publishCmd: 'npm run pack',
},
];
const npm = '@semantic-release/npm';
const github = [
'@semantic-release/github',
{
assets: [
{
path: 'dist/*.tar.gz',
label: 'Architect-CLI ${nextRelease.version}',
},
],
},
"assets": [
{ "path": "./dist/windows/*", "name": "arcctl-windows-${nextRelease.gitTag}.exe", "label": "Windows ${nextRelease.gitTag}" },
{ "path": "./dist/linux/*", "name": "arcctl-linux-${nextRelease.gitTag}", "label": "Linux ${nextRelease.gitTag}" },
{ "path": "./dist/osx-amd64/*", "name": "arcctl-osx-amd64-${nextRelease.gitTag}", "label": "OSX Aam64 ${nextRelease.gitTag}" },
{ "path": "./dist/osx-arm64/*", "name": "arcctl-osx-arm64-${nextRelease.gitTag}", "label": "OSX Arm64 ${nextRelease.gitTag}" },
]
}
];
const changelog = [
'@semantic-release/changelog',
{
changelogFile: 'CHANGELOG.md',
},
];
const backmerge = [
'@saithodev/semantic-release-backmerge',
{
branches: ['rc'],
// Makes sure that only pushed changes are backmerged
clearWorkspace: true,
'changelogFile': 'CHANGELOG.md',
},
];

const defaultPlugins = [
commitAnalyzer,
releaseNotesGenerator,
npm,
git,
];

const mainPlugins = [
const default_plugins = [
commitAnalyzer,
releaseNotesGenerator,
changelog,
exec,
npm,
git,
github,
];

// eslint-disable-next-line unicorn/prefer-module
module.exports = {
branches: [
'main',
{
name: 'rc',
prerelease: true,
},
'branches': [
{
name: 'arcctl-*',
prerelease: true,
},
'name': 'main',
}
],
plugins: branch === 'main' ? mainPlugins : defaultPlugins,
plugins: default_plugins,
};

// eslint-disable-next-line unicorn/prefer-module
console.log(module.exports);
28 changes: 28 additions & 0 deletions vendor_dist/choco/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Chocolatey Release System

This folder contains all the necessary tools in order to release a new version of `arcctl` with Chocolatey.

## Update Version
To update the version you will need to change 2 lines.
### Automatic
```
ARCCTL_VERSION=v0.0.3 bash upgrade_version.sh
```
### tools/chocolateyinstall.ps1
This is the version that gets downloaded from the github release page.
Update the line
```
$version = 'v0.0.2'
```
### arcctl.nuspec
This is the version that will appear on choco.
Update the line
```
<version>0.0.1</version>
```

## Pack
```
docker run --rm -it -v ./:/arcctl chocolatey/choco:latest-linux choco pack /arcctl/arcctl.nuspec --outputdirectory /arcctl
```
This will produce the file `arcctl.0.0.1.nupkg` which can be published.
22 changes: 22 additions & 0 deletions vendor_dist/choco/arcctl.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>arcctl</id>
<version>v0.0.3</version>
<packageSourceUrl>https://github.com/architect-team/arcctl</packageSourceUrl>
<owners>Architect.io</owners>

<!-- == SOFTWARE SPECIFIC SECTION == -->
<!-- This section is about the software itself -->
<title>arcctl (Install)</title>
<authors>Architect.io</authors>
<projectUrl>https://github.com/architect-team/arcctl</projectUrl>
<tags>arcctl cloud datacenter</tags>
<summary>for creating on-demand cloud infrastructure</summary>
<description>arcctl standardizes the interfaces for common cloud resources like VPCs, managed kubernetes clusters, and more, making it easier for developers to create and manage on-demand cloud infrastructure. With this CLI, you'll be able to list, get, create, or delete supported resources from your favorite cloud providers and tools without learning the API calls or language used by each individual provider. </description>
</metadata>
<files>
<file src="tools\**" target="tools" />
<!--Building from Linux? You may need this instead: <file src="tools/**" target="tools" />-->
</files>
</package>
Loading