Skip to content

Commit

Permalink
Use the standard setup actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ausias-armesto committed Sep 13, 2024
1 parent 47ad8a5 commit 05adee2
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 66 deletions.
53 changes: 0 additions & 53 deletions .github/actions/setup/action.yaml

This file was deleted.

16 changes: 12 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@ jobs:
runs-on: self-hosted-hoprnet-small

steps:
- name: Setup uhttp repository
id: setup
uses: hoprnet/uhttp-crypto/.github/actions/setup@main
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: hoprnet/hopr-workflows/actions/setup-node-js@master
with:
node-version: 20

- name: Setup GCP
id: gcp
uses: hoprnet/hopr-workflows/actions/setup-gcp@master
with:
google-credentials: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }}
login-artifact-registry: 'true'

- name: Building
run: yarn build
Expand All @@ -41,4 +49,4 @@ jobs:
mv temp.json package.json
yarn publish --no-git-tag-version --tag next
env:
NODE_AUTH_TOKEN: ${{ steps.setup.outputs.access_token }}
NODE_AUTH_TOKEN: ${{ steps.gcp.outputs.access_token }}
16 changes: 12 additions & 4 deletions .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ jobs:
if: github.event.pull_request.merged == true

steps:
- name: Setup uhttp repository
id: setup
uses: hoprnet/uhttp-crypto/.github/actions/setup@main
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: hoprnet/hopr-workflows/actions/setup-node-js@master
with:
node-version: 20

- name: Setup GCP
id: gcp
uses: hoprnet/hopr-workflows/actions/setup-gcp@master
with:
google-credentials: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }}
login-artifact-registry: 'true'

- name: Unpublish PR commit versions
run: |
Expand All @@ -44,4 +52,4 @@ jobs:
mv temp.json package.json
yarn publish --no-git-tag-version --tag alpha
env:
NODE_AUTH_TOKEN: ${{ steps.setup.outputs.access_token }}
NODE_AUTH_TOKEN: ${{ steps.gcp.outputs.access_token }}
18 changes: 13 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@ jobs:
runs-on: self-hosted-hoprnet-small

steps:
- name: Setup uhttp repository
id: setup
uses: hoprnet/uhttp-crypto/.github/actions/setup@main
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: hoprnet/hopr-workflows/actions/setup-node-js@master
with:
node-version: 20

- name: Setup GCP
id: gcp
uses: hoprnet/hopr-workflows/actions/setup-gcp@master
with:
google-credentials: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }}
login-artifact-registry: 'true'

- name: Building
run: yarn build
Expand Down Expand Up @@ -85,7 +93,7 @@ jobs:
- name: Publish to Google Artifact Registry
run: yarn publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ steps.setup.outputs.access_token }}
NODE_AUTH_TOKEN: ${{ steps.gcp.outputs.access_token }}

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -133,4 +141,4 @@ jobs:
to: 'Releases'
topic: 'main'
content: |
I'm glad to inform that version **${{ vars.NPM_PACKAGE_NAME }}@${{ steps.changelog.outputs.current_version }}** has been released. See [ChangeLog](https://github.com/hoprnet/uHTTP-crypto/releases/tag/v${{ steps.changelog.outputs.current_version }})
I'm thrilled to inform that version **${{ vars.NPM_PACKAGE_NAME }}@${{ steps.changelog.outputs.current_version }}** has been released. See [ChangeLog](https://github.com/${{ github.repository }}/releases/tag/v${{ steps.changelog.outputs.current_version }})

0 comments on commit 05adee2

Please sign in to comment.