Skip to content

Commit

Permalink
debug: transfer data between jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
hickey committed Feb 9, 2024
1 parent 425db4a commit 71c1f9e
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 57 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/build-api-package.yaml

This file was deleted.

26 changes: 13 additions & 13 deletions .github/workflows/build-meshchat-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build MeshChat Package
on:
workflow_call:
inputs:
version:
build_version:
required: true
type: string
build_dir:
Expand All @@ -12,23 +12,23 @@ on:
jobs:
create-meshchat-package:
runs-on: ubuntu-latest
container:
image: registry.gitlab.com/wt0f/gitlab-runner-images/shell:latest
# container:
# image: registry.gitlab.com/wt0f/gitlab-runner-images/shell:latest
outputs:
package_file: ${{ steps.detect-package-file.outputs.file }}
steps:
- uses: actions/checkout@v3
- run: info "Populating the filesystem with MeshChat files"
- uses: actions/checkout@v4
# - run: info "Populating the filesystem with MeshChat files"
- run: echo ${{ inputs.build_version }} > VERSION
- run: package/populate-meshchat-fs.sh ${{ inputs.build_dir }}
- run: info "Updating version numbers to "
# - run: info "Updating version numbers to "
- run: package/update-version.sh ${{ inputs.build_dir }}
- run: info "Packing up MeshChat files"
# - run: info "Packing up MeshChat files"
- run: package/ipk-build.sh ${{ inputs.build_dir }}
- id: detect-package-file
run: echo "file=$(ls -1 meshchat_*.ipk)"
- uses: actions/upload-artifact@v3
run: echo "file=$(ls -1 meshchat_*.ipk)" >> $GITHUB_OUTPUT
- run: echo "${{ steps.detect-package-file.outputs.file }}"
- uses: actions/upload-artifact@v4
with:
name: meshchat
path: |
meshchat_*.ipk
VERSION
name: ${{ steps.detect-package-file.outputs.file }}
path: ${{ steps.detect-package-file.outputs.file }}
62 changes: 36 additions & 26 deletions .github/workflows/release-meshchat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,60 @@ on:
pull_request:
types: [closed]
branches: [release]
env:
IPK_DIR: package/meshchat-ipkg
push:

jobs:
calculate-version-number:
runs-on: registry.gitlab.com/wt0f/gitlab-runner-images/node:latest
runs-on: ubuntu-latest
# container:
# image: registry.gitlab.com/wt0f/gitlab-runner-images/node:latest
outputs:
build_version: ${{ steps.detect_version.outputs.build_version }}
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_IT_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: npm install -g release-it @release-it/conventional-changelog @commitlint/config-conventional @commitlint/cli auto-changelog
- run: npx release-it --ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: git checkout master
- run: git rebase release
- run: git push
- run: npx release-it --release-version > VERSION
- id: detect_version
run: echo "version=$(cat VERSION)" >> "${GITHUB_OUTPUT}"
- uses: action/upload-artifact@v3
with:
name: meshchat
path: |
VERSION
run: echo "build_version=$(npx release-it --release-version)" >> $GITHUB_OUTPUT
- run: npx release-it --ci

# - run: git checkout master
# - run: git rebase release
# - run: git push
# - uses: actions/upload-artifact@v4
# with:
# name: meshchat
# path: VERSION

release_meshchat_package:
release-meshchat-package:
needs: calculate-version-number
uses:
hickey/meshchat/.github/workflows/build-meshchat-pacakge.yaml@master
./.github/workflows/build-meshchat-package.yaml
with:
version: ${{ steps.detect_version.outputs.version }}
build_dir: ${{ env.IPK_DIR }}
build_version: ${{ needs.calculate-version-number.outputs.build_version }}
build_dir: package/meshchat-ipkg

add-meshchat-package-to-release:
needs: release-meshchat-package
# container:
# image: registry.gitlab.com/wt0f/gitlab-runner-images/node:latest
runs-on: ubuntu-latest
container:
image: registry.gitlab.com/wt0f/gitlab-runner-images/node:latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: npm install -g release-it @release-it/conventional-changelog @commitlint/config-conventional @commitlint/cli auto-changelog
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: meshchat
name: ${{ needs.release_meshchat_package.outputs.package_file }}
path: ${{ needs.release_meshchat_package.outputs.package_file }}
- run: npx release-it --ci --no-increment --no-git --github.release=false --github.assets=*.dep --github.assets=*.ipk
- run: npx release-it --ci --no-git --github.release=false --github.assets=*.dep --github.assets=*.ipk
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_IT_TOKEN }}

0 comments on commit 71c1f9e

Please sign in to comment.