Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Signal K release action #1701

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
23 changes: 11 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ jobs:
registry-url: 'https://registry.npmjs.org'
- name: Set tag variable
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/*/})
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Install, build & publish
run: |
npm install --package-lock-only
npm ci && npm cache clean --force
if [[ "${{ steps.vars.outputs.tag }}" == *beta* ]];
if [[ "$tag" == *beta* ]];
then
npm publish --tag beta
else
Expand All @@ -134,18 +134,17 @@ jobs:
steps:
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v1
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}

- name: Create Release
uses: actions/create-release@v1
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{steps.github_release.outputs.changelog}}
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
name: ${{ github.ref }}
body_path: ${{steps.github_release.outputs.changelog}}
token: ${{ secrets.RELEASE_PAT }}

docker_image:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -177,14 +176,14 @@ jobs:
password: ${{ secrets.GHCR_PAT }} # Personal access tokens (classic) with a scope of "write:packages" is needed to release ghcr.io package registry.
- name: Set TAG for build-args
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/*/})
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v5
with:
file: ./docker/Dockerfile_rel
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
tags: $tag
build-args: |
TAG=${{ steps.vars.outputs.tag }}

Expand All @@ -198,9 +197,9 @@ jobs:
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Set TAG for build-arg
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/*/})
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Deploy demo.signalk.org at fly.io
working-directory: ./fly_io/demo_signalk_org
run: flyctl deploy --remote-only --build-arg SK_VERSION=${{ steps.vars.outputs.tag }}
run: flyctl deploy --remote-only --build-arg SK_VERSION=$tag
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
Loading