Skip to content

Commit

Permalink
fix: versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
tsi committed Dec 28, 2023
1 parent 498253b commit 1d63b92
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/release-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,29 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: get-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- uses: actions/checkout@v1

- name: "call action"
id: last_release
uses: InsonusK/get-latest-release@v1.0.1
with:
myToken: ${{ github.token }}
view_top: 1

- name: "Print result"
run: |
echo "id: ${{ steps.last_release.outputs.id }}"
echo "name: ${{ steps.last_release.outputs.name }}"
echo "tag_name: ${{ steps.last_release.outputs.tag_name }}"
echo "created_at: ${{ steps.last_release.outputs.created_at }}"
echo "draft: ${{ steps.last_release.outputs.draft }}"
echo "prerelease: ${{ steps.last_release.outputs.prerelease }}"
- name: Calculate edge version
id: calculate-edge-version
uses: ./.github/actions/calculate-edge-version
with:
version: ${{ steps.package-version.outputs.current-version }}
version: ${{ steps.last_release.outputs.tag_name }}

- run: echo ${{ steps.calculate-edge-version.outputs.next-edge }}

Expand All @@ -29,14 +43,12 @@ jobs:
release-as: ${{ steps.calculate-edge-version.outputs.next-edge }}

# The logic below handles the npm publication:
- uses: actions/checkout@v4
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
with:
node-version: '20.x'
if: ${{ steps.release.outputs.release_created }}
# these if statements ensure that a publication only occurs when
# a new release is created:
- run: npm ci
if: ${{ steps.release.outputs.release_created }}
- run: npm run build-all
Expand Down

0 comments on commit 1d63b92

Please sign in to comment.