-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Oclif, use shell instead of bash
- Loading branch information
1 parent
951f686
commit 0d6d687
Showing
27 changed files
with
729 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@graphql-hive/cli': minor | ||
--- | ||
|
||
Support HIVE_AUTHOR and HIVE_COMMIT env vars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@graphql-hive/cli': patch | ||
--- | ||
|
||
Adds windows installer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
# Release alpha version on NPM for Hive libraries | ||
npm: | ||
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main | ||
with: | ||
npmTag: alpha | ||
buildScript: build:libraries | ||
nodeVersion: 18 | ||
packageManager: pnpm | ||
secrets: | ||
githubToken: ${{ secrets.GITHUB_TOKEN }} | ||
npmToken: ${{ secrets.NPM_TOKEN }} | ||
|
||
# Upload zipped tarballs to GitHub | ||
cli-artifacts: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: setup environment | ||
uses: ./.github/actions/setup | ||
with: | ||
codegen: false # no need to run because release script will run it anyway | ||
actor: release-alpha | ||
|
||
- name: build libraries | ||
run: pnpm build:libraries | ||
|
||
# Needed for `oclif pack win` | ||
- name: Install NSIS | ||
run: | | ||
sudo apt-get -y install nsis | ||
- name: pack tarballs | ||
working-directory: packages/libraries/cli | ||
run: pnpm oclif:pack | ||
|
||
- name: upload darwin arm64 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: hive-cli-darwin-arm64 | ||
path: ./packages/libraries/cli/dist/*-darwin-arm64.tar.gz | ||
|
||
- name: upload darwin x64 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: hive-cli-darwin-x64 | ||
path: ./packages/libraries/cli/dist/*-darwin-x64.tar.gz | ||
|
||
- name: upload windows x64 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: hive-cli-windows-x64 | ||
path: ./packages/libraries/cli/dist/win32/*-x64.exe | ||
|
||
- name: upload windows x86 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: hive-cli-windows-x86 | ||
path: ./packages/libraries/cli/dist/win32/*-x86.exe | ||
|
||
- name: upload linux arm | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: hive-cli-linux-arm | ||
path: ./packages/libraries/cli/dist/*-linux-arm.tar.gz | ||
|
||
- name: upload linux x64 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: hive-cli-linux-x64 | ||
path: ./packages/libraries/cli/dist/*-linux-x64.tar.gz | ||
|
||
cli-test: | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
needs: [cli-artifacts] | ||
steps: | ||
- name: Pull artifact for macos | ||
if: matrix.os == 'macos-latest' | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: hive-cli-darwin-x64 | ||
|
||
- name: Pull artifact for ubuntu | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: hive-cli-linux-x64 | ||
|
||
- name: Pull artifact for windows | ||
if: matrix.os == 'windows-latest' | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: hive-cli-windows-x64 | ||
|
||
- name: Unzip and run | ||
run: | | ||
rm -rf /usr/local/bin/node | ||
rm -rf /usr/local/lib/node | ||
if command -v node &> /dev/null | ||
then | ||
echo "Expected node to not be installed" | ||
command -v node | ||
exit 1 | ||
fi | ||
tar -xzf *.tar.gz | ||
# Expect the command to succeed | ||
./hive/bin/hive --version || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM node:18.16.0-slim | ||
|
||
WORKDIR /usr/src/app | ||
COPY . /usr/src/app/ | ||
|
||
RUN npm install --omit=dev | ||
RUN npm install -g file:./ | ||
|
||
LABEL org.opencontainers.image.title=$IMAGE_TITLE | ||
LABEL org.opencontainers.image.version=$RELEASE | ||
LABEL org.opencontainers.image.description=$IMAGE_DESCRIPTION | ||
LABEL org.opencontainers.image.authors="The Guild" | ||
LABEL org.opencontainers.image.vendor="Kamil Kisiela" | ||
LABEL org.opencontainers.image.url="https://github.com/kamilkisiela/graphql-hive" | ||
|
||
ENV ENVIRONMENT production | ||
ENV RELEASE $RELEASE | ||
RUN npx hive --version | ||
|
||
ENTRYPOINT ["npx", "hive"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
hive.json |
Oops, something went wrong.