Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 💬 General Questions
url: https://github.com/sql-bi/dev-daxlib-sample/discussions
url: https://github.com/daxlib/dev-daxlib-sample/discussions
about: Please ask and answer questions as a discussion thread
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ body:
attributes:
label: Feature Request
description:
Write a clear and concise description of the feature or problem you would like to see addressed in dev-daxlib-sample.
Write a clear and concise description of the feature or problem you would like to see addressed.
validations:
required: true
- type: textarea
id: proposed-solution
attributes:
label: Proposed Solution
description: Describe your proposed solution and how it will benefit dev-daxlib-sample and its users.
description: Describe your proposed solution and its benefits for the project and its users.
validations:
required: true
- type: textarea
Expand Down
76 changes: 0 additions & 76 deletions .github/workflows/publish-daxlib-sample.yml

This file was deleted.

119 changes: 119 additions & 0 deletions .github/workflows/publish-package-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# GitHub Actions workflow for publishing DaxLib packages
#
# This workflow automates the publication of a new package version to the daxlib/daxlib repository.
# Maintainers can trigger it manually via the "Run workflow" button in the Actions tab.
#
# Steps:
# - Extracts the package name and version from the manifest file
# - Creates or updates a release branch in the upstream repository
# - Copies the package files to the appropriate folder structure
# - Commits and pushes the changes
# - Creates a pull request for new releases

name: publish-package-pr

on:
workflow_dispatch:

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest
steps:
# Checkout the current repository
- name: Checkout source
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
path: source-repo

# Generate the app token
- name: Generate app token
id: bot_auth
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.DAXLIBDEVBOT_APPID }}
private-key: ${{ secrets.DAXLIBDEVBOT_APPKEY }}
owner: daxlib
repositories: daxlib

# Checkout the upstream repository daxlib/daxlib
- name: Checkout upstream
uses: actions/checkout@v4
with:
repository: daxlib/daxlib
path: upstream-repo
token: ${{ steps.bot_auth.outputs.token }}

# Configure Git
- name: Git config
working-directory: upstream-repo
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"

# Read the package version from the manifest
- name: Read package manifest
id: package
working-directory: source-repo
run: |
PACKAGE_NAME=$(jq -r '.id' src/manifest.daxlib)
echo "name=${PACKAGE_NAME}" >> $GITHUB_OUTPUT
echo "Package name: ${PACKAGE_NAME}"
PACKAGE_VERSION=$(jq -r '.version' src/manifest.daxlib)
echo "version=${PACKAGE_VERSION}" >> $GITHUB_OUTPUT
echo "Package version: ${PACKAGE_VERSION}"
PACKAGE_FOLDER="packages/$(echo "${PACKAGE_NAME}" | cut -c1 | tr '[:upper:]' '[:lower:]')/$(echo "${PACKAGE_NAME}" | tr '[:upper:]' '[:lower:]')/${PACKAGE_VERSION}"
echo "folder=${PACKAGE_FOLDER}" >> $GITHUB_OUTPUT
echo "Package folder: ${PACKAGE_FOLDER}"

# Checkout the branch (or create it if it doesn't exist)
- name: Checkout branch
id: branch
working-directory: upstream-repo
run: |
BRANCH_NAME="${{ github.event.repository.name }}/publish-${{ steps.package.outputs.name }}-${{ steps.package.outputs.version }}"
echo "name=${BRANCH_NAME}" >> $GITHUB_OUTPUT
echo "Branch name: ${BRANCH_NAME}"
git fetch origin
if git show-ref --verify --quiet "refs/remotes/origin/${BRANCH_NAME}"; then
echo "action=Update" >> $GITHUB_OUTPUT
git checkout "${BRANCH_NAME}"
else
echo "action=Add" >> $GITHUB_OUTPUT
git checkout -b "${BRANCH_NAME}"
fi

# Create the package folder if it doesn't exist
- name: Create package folder
working-directory: upstream-repo
run: mkdir -p "${{ steps.package.outputs.folder }}"

# Copy package files to the new folder
- name: Copy package files
run: cp -rv source-repo/src/* "upstream-repo/${{ steps.package.outputs.folder }}/"

# Commit changes
- name: Git commit changes
working-directory: upstream-repo
run: git add -A && git commit -m "${{ steps.branch.outputs.action }} package ${{ steps.package.outputs.name }} version ${{ steps.package.outputs.version }}"

# Push to upstream
- name: Git push upstream
working-directory: upstream-repo
run: git push origin "${{ steps.branch.outputs.name }}"

# Create the pull request (if the branch was created)
- name: Create pull request
if: steps.branch.outputs.action == 'Add'
working-directory: upstream-repo
env:
GH_TOKEN: ${{ steps.bot_auth.outputs.token }}
run: |
gh pr create \
--title "Add package \`${{ steps.package.outputs.name }}\` version ${{ steps.package.outputs.version }}" \
--body "Automated package publication from ${{ github.repository }}" \
--base main \
--head "${{ steps.branch.outputs.name }}"
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"analysis-services.tmdl",
"davidanson.vscode-markdownlint"
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.detectIndentation": false,
"files.associations": {
"*.daxlib": "json"
}
}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ This repository is where we:
- Review and merge contributions

> [!IMPORTANT]
> Please do not submit issues or contributions directly to sql-bi/daxlib. All development activity should occur in this repository.
> Please do not submit issues or contributions directly to [daxlib](https://github.com/daxlib/daxlib) GitHub repository. All development activity should take place in this repository.

## Release Process

New versions follow this workflow:

- Development happens in this repository
- Releases are submitted via Pull Requests to [sql-bi/daxlib](https://github.com/sql-bi/daxlib)
- Releases are submitted via Pull Requests to the [daxlib](https://github.com/daxlib/daxlib) repository on GitHub
- Once the Pull Request is approved and merged, the release becomes available on [daxlib.org](https://daxlib.org/)

## How to Contribute

- Fork this repository: [https://github.com/sql-bi/dev-daxlib-sample/fork](https://github.com/sql-bi/dev-daxlib-sample/fork)
- Fork this repository: [https://github.com/daxlib/dev-daxlib-sample/fork](https://github.com/daxlib/dev-daxlib-sample/fork)
- Create a feature branch for your changes
- Submit a Pull Request with a clear description of your changes

## How to report Issues

- Open an issue or bug using GitHub Issues: https://github.com/sql-bi/dev-daxlib-sample/issues/new
- Open an issue or bug using GitHub Issues: https://github.com/daxlib/dev-daxlib-sample/issues/new

## How to stay updated on new releases

To receive notifications for every new release, you can use the GitHub **Subscribe** feature:

1. Go to the main page of the repository: [https://github.com/sql-bi/dev-daxlib-sample](https://github.com/sql-bi/dev-daxlib-sample)
1. Go to the main page of the repository: [https://github.com/daxlib/dev-daxlib-sample](https://github.com/daxlib/dev-daxlib-sample)
2. In the top right, click the **Notifications** bell icon and select **Watching**
3. This way, you can configure your notification for new releases and other activities